Deib has asked for the wisdom of the Perl Monks concerning the following question:

Greetings monks!
Just two small questions:

Is there any way to convert a perl program to autoexecutable or something like that to run them on different machines?(like *.exe files)

Also, is it too hard to port a perl program that uses various downloaded libraries from Windows to UNIX?

I'm really clueless here, so any input I can get on this kind of issues is greatly appreciated. Thanks.

Replies are listed 'Best First'.
Re: Porting Perl programs
by rev_1318 (Chaplain) on Mar 31, 2005 at 09:05 UTC
    Is there any way to convert a perl program to autoexecutable or something like that to run them on different machines?(like *.exe files)

    You could use PAR, for example, but that won't make a portable executable!

    For information on portability, see perlport

    Paul

Re: Porting Perl programs
by jbrugger (Parson) on Mar 31, 2005 at 09:56 UTC
    Why didn't you search first? this is answered more times, lik here: Creating a windows EXE from Perl script

    > Also, is it too hard to port a perl program that uses various downloaded libraries from Windows to UNIX
    That depends on the libraries, are they perl specific? yes, just download them via cpan...

    "We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.
Re: Porting Perl programs
by InfiniteLoop (Hermit) on Mar 31, 2005 at 11:22 UTC
    take a look at perlcc and perlcompile, it helps you to "generate executables from Perl programs"
Re: Porting Perl programs
by Anonymous Monk on Mar 31, 2005 at 10:34 UTC
    Is there any way to convert a perl program to autoexecutable or something like that to run them on different machines?
    Yes, although I'm not going to go into details. It usually requires modifying your compiler, but it is possible to generate binaries that will run on different platforms. The trick involves in having the different binaries (for each platform) in one file, and to very early on in the program loader, jump to the right binary. While I won't know whether this will work between any two platforms, I know from experience, it's possible between some.

    But I don't think you really want to do that. It's highly non-trivial and will take a lot of work to get it done.