🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.perl.misc
Article #8

Re: Need Perl to C translator

#8
From: Tom Christiansen
Date: Mon, 04 Mar 1996 15:06
44 lines
2235 bytes
 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    Luca Ronchi <ronchi@cache.iet.unipi.it> writes:
:I need a Perl to C translator, because I must include some stuff in a
:C program. Is out there something, or there is another way of
:executing Perl scripts without the interpreter; I mean can a perl
:script be made in a executable ?

Help #1: read the fine perl FAQ, even if it is outdated.  There's
	 a question addressing this; #3.5 to be precise.

    http://www.perl.com/perl/faq/Q3.5.html

Help #2: think about whether you can just call your perl program 
	 using system() or popen().

     $ man 3 system
     $ man 3 open

Help #3: think about whether you can embed your C program in the 
	 perl one.  For that, see the perlxstut(1) man page.  It's
	 probably more sensible to do more work at the higher level
	 language (perl), leaving little painstaking busiwork for the 
	 low-level one (C).

    http://www.perl.com/perl/manual/perlxstut.html

Help #4: think about whether you can embed your perl program in the 
	 C one the way the perlembed(1).  It's probably
	 more sensible to do more work at the higher level language.

    http://www.perl.com/perl/manual/perlembed.html

Help #5: There's actually a p2c compiler to convert your perl code
    into C that in alpha state right now, but it's not released to 
    the general world yet.

--tom "the net helps those who help themselves" christiansen
-- 
Tom Christiansen      Perl Consultant, Gamer, Hiker      tchrist@mox.perl.com

            /* dbmrefcnt--;  */     /* doesn't work, rats */
        --Larry Wall in hash.c from the v4.0 perl source code
Technical Details
Message-ID: <4hf0tv$aio@csnews.cs.colorado.edu>
Path: arc1-ca.pugleaf.net!in1.uu.net!csnews!mox!tchrist
References: <313AD616.3EFE2530@cache.iet.unipi.it>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!in1.uu.net!csnews!mox!tchrist
From: Tom Christiansen <tchrist@mox.perl.com>
Newsgroups: comp.lang.perl.misc,comp.lang.c
Subject: Re: Need Perl to C translator
Date: 4 Mar 1996 15:06:39 GMT
Organization: Perl Consulting and Training
Message-ID: <4hf0tv$aio@csnews.cs.colorado.edu>
References: <313AD616.3EFE2530@cache.iet.unipi.it>
Reply-To: tchrist@mox.perl.com (Tom Christiansen)
NNTP-Posting-Host: perl.com
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Originator: tchrist@mox