Compile the Perl script into exe

Source: Internet
Author: User
Tags perl interpreter perl script

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.