Source: http://www.veryhuo.com/a/view/38338.html
Today you want to compile the Perl script as an EXE to run independently from the Perl interpreter. Can generate a Perl PE file, which is presented on the Perl website.
Perl scripts compiled into EXE are generally 4 ways:
1. Use the perl2exe tool (need to buy, of course, there are cracked or green version, but only found in the 5.0 version of the Web, and my version is 5.12, the version is too low so can not be used)
EXE file large volume operation slow
2. Using ActiveState Company's Perl Dev Kit (requires purchase)
3. Use ActivePerl free
I will introduce the free method, the first to install the required modules, I use the Windows platform under the ActivePerl 5.12:
Start running cmd, knock perl-mcpan-e Shell behind Intall + module
Cpan> Install + module
The modules that need to be installed are:
Parse::binary, Win32::exe, Module::scandeps, PAR::D ist, Par,par::P Acker
It takes a while for each module to be installed, especially par::P Acker
Execute Pp-o foo.exe After installation is complete foo.pl
Generally generated EXE file is very big about 10M
Find the generated EXE Click Run, OK, work done.
4. convert PERLCC to C in compile
In the Windows system is translated into EXE, (with Cygwin, but with he will produce a. dll file, and I want to generate a single EXE file)
5. pdk5x
6. Tinyperl
7. p2e
Compile the Perl script into exe