From perlfaq3 answer to How can I compile my Perl program into byte code or C? :
(contributed by brian d foy)
In general, you cannot do this. However, there are some things that may work for your situation. People usually ask this question because they want to distribute their work without giving away the source code, and most of the solutions are used for disk space for convenience. You probably won't see a big increase in speed either, as most solutions simply bundle the Perl interpreter in the final product (but see. How can I get my Perl program to work faster?).
The Perl Archive Toolkit ( http://par.perl.org/ ) is a Perl analogue of the Java JAR. It is freely available on CPAN ( http://search.cpan.org/dist/PAR/ ).
There are also some commercial products that may work for you, although you must buy a license for them.
The Perl Dev suite ( http://www.activestate.com/Products/Perl_Dev_Kit/ ) from ActiveState allows you to "turn your Perl programs into executable files for HP-UX, Linux, Solaris, and Windows."
Perl2Exe ( http://www.indigostar.com/perl2exe.htm ) is a command-line tool for converting perl scripts to executable files. It is designed for both Windows and Unix platforms.
brian d foy Aug 07 '09 at 3:12 2009-08-07 03:12
source share