1) What actually happens when I convert my perl code to exe or How does perl get converted to an exe ?.

The way you ask this, it almost sounds as if you don't realize that Perl code *normally* is not converted to an exe. Perl code is, under ordinary circumstances, compiled very rapidly at execution time, by perl. This occasionally surprises people coming from other languages, like C, which require compilation and linking before execution, and which take a long time to do the compilation and linking. perl does it *very* quickly.

superfrink has listed a number of ways to mimic more traditional compilation, but fundamentally Perl is not designed to work like that. Usually you just do something like perl my_perl_code.pl to execute your code, and perl reads your code and runs it on the spot, just like that, without any need for separate compilation and linking steps. This approach has a number of advantages, which we can discuss if you're interested.

The cheif disadvantage is that when you distribute your code, you need perl itself also to be installed on all the systems that are going to run it. PAR and similar solutions are designed to work around that, but these days perl is included out of the box on almost every major operating system -- *every* major server-oriented operating system -- so it's becomming almost a non-issue except for desktop stuff. Desktop stuff of course usually needs to work in Windows, which still doesn't come with perl, although everything else has come with it for ten years or so. For Windows systems you still have to download and install perl, unless you use PAR or something like that.


Sanity? Oh, yeah, I've got all kinds of sanity. In fact, I've developed whole new kinds of sanity. Why, I've got so much sanity it's driving me crazy.

In reply to Re: perl exe execution by jonadab
in thread perl exe execution by prad_intel

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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, details, 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, summary, 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.