in reply to perl exe execution

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.