Turning your Perl into a Windows Executable lets you distribute a program and not have to worry about having perl installed and managed on the target system.
Using this method does not “compile” the perl, meaning that the source is still accessible and also there is no improvement on performance, in fact there will be a tiny overhead for unpacking and setting up the environment to run.
I am using Strawberry perl which is my preferred package of Perl for Windows.
You will need the PAR::Packer module which you can install from CPAN. Bring up the CPAN shell with the command “cpan” at your Perl Shell or Command Prompt. Within CPAN shell run the command “install PAR::Packer”.
With any luck this will work without a problem but I stumbled upon a few errors during this step. Check that your Strawberry perl shell has PATH of your installation strawberry/perl/site/bin, strawberry/perl/bin and strawberry/c/bin. They MUST appear ahead of any other path with MINGW compiling tools.
When this module is installed an program called “pp” will be available in strawberry/perl/site/bin.
pp perl_program.pl -o program_executable.exe
Before you run the above command you will likely need to disable virus scanning shields. For me Avast! caused an executable name “parlXXXXX.exe” to become frozen without any warnings.