On Tue, 1 Nov 2005, Brent Clark wrote:

> Just a thought, is it possible to compile perl code in to some type of 
> binary format file, and then perl can execute the bin file.
> 
> Just somthing I was thinking.

http://www.google.com/search?q=perl+compiler

But then, I'm sure you spent the three seconds it would take to do a 
search for the hundreds of hits that 'perl compiler' turns up before 
repeating this FAQ to the list, right? Of course you did :-)

 * * *

The short answer is that yes, it's possible, with the help of tools like 
perlcc and Perl2EXE, but these generally don't work as well as most 
people would prefer. For one thing, they build everything in, so your 20 
line Perl script ends up being 5 or 10 mb or more compiled because the 
binary has to include both the Perl executable binary as well as the 
binary versions of any CPAN modules your script depends on. Yow!

In most cases, particularly on civilized platforms where Perl is likely 
to be installed on the system from the start (e.g. everything but 
Windows), you're better off just distributing the regular text version 
of your scripts. That way, they end up being smaller, faster, and much 
easier to maintain. 

But yes, if you really want to do this, it's possible. As the three 
second Google search I'm sure you did would have already told you :-)


-- 
Chris Devers

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to