Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

How do I make a Perl script into a self-contained executable?

by raveguy2k (Novice)
on Jul 31, 2002 at 01:31 UTC ( #186402=categorized question: print w/replies, xml ) Need Help??
Contributed by raveguy2k on Jul 31, 2002 at 01:31 UTC
Q&A  > programs and processes


Is there any way to once you've got your perl program to work to make it to where you don't need to have active perl installed on another comp for it to work. Say if you wrote an address book in perl or something an I wanted to send it to my friend for him to use, is there any way for me to make it into an exe or something so he wouldn't have to install active perl?

Answer: How do I make a Perl script into a self-contained executable?
contributed by radiantmatrix

There are several approaches to producing self-contained executable packages from Perl programs.

  1. ActiveState offers their Perl Dev Kit (PDK), which contains a tool called PerlApp. Using the PerlApp GUI tool, any set of Perl scripts can be "compiled" into a single distributable Windows EXE file. This is a commercial solution.
  2. Perl2EXE is a command-line tool with a similar goal as PerlApp above. There are "lite" (gratis) and "pro" (commercial) versions available with varying feature-sets.
  3. PAR is a cross-platform packager. The included pp utility is capable of creating perl packages in Windows EXE and Linux binary formats. (Possibly OSX as well? Untested...). However, PAR can also be used to distribute packages that require only a basic Perl distribution and the PAR runtime parl. These are not executables, but work similar to Java's JAR files.

There are additional ways to accomplish the core goal of distributable packages, but the above are the recommended, well-tested methods.

At some point in the future, Parrot may provide functionality to create reusable libraries, executables, and/or packages from Perl programs. Keep an eye on its development.

Answer: Always working
contributed by Nightblade

Here is utility called Perl2exe.
Nice title, isn't it? :)

Answer: Always working
contributed by Marza

You can also try PerlApp from ActiveState but it does cost you a bit as it is part of the DevKit

Answer: How do I make a Perl script into a self-contained executable?
contributed by reneeb

I use the Autrijus' PAR-module. This works fine and it is - Perl.

Answer: How do I make a Perl script into a self-contained executable?
contributed by superfrink

There is also the perlcc program.

I have used perlcc on very simple programs without any problems but perldoc does refer to perlcc as "very experimental".

Please (register and) log in if you wish to add an answer

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others making s'mores by the fire in the courtyard of the Monastery: (7)
    As of 2020-10-20 17:29 GMT
    Find Nodes?
      Voting Booth?
      My favourite web site is:

      Results (210 votes). Check out past polls.