-   Linux - General (
-   -   Compile Perl into executable (

Xyem 12-03-2005 02:42 PM

Compile Perl into executable
In Windows this would be about converting a Perl script into an .exe. I want to do something similiar but into a Linux executable (which doesn't seem to have an extension). How can I do this or is there a particular program I need to use?

acid_kewpie 12-03-2005 03:37 PM

have a look at the B perl module.

Hangdog42 12-04-2005 09:03 AM

While I admit to being functionally illiterate in perl, wouldn't simply making the script executable with chmod essentially do the same thing? I know it wouldn't be a binary, but it would be executable.

Xyem 12-04-2005 10:01 AM

I want people who do not have Perl to be able to run it..

spooon 12-04-2005 04:04 PM

This is very hard or impossible. Because Perl is an interpreted language with stuff like "eval", you would essentially have to include Perl along with your script. You would be better off writing your program in a compiled language like C++ or something. Also, there are few if any Linux users who don't have Perl.

acid_kewpie 12-04-2005 04:41 PM

like i already said, use the B module. it is not hard nor impossible to compile perl.

Xyem 12-05-2005 02:38 AM

Firstly I don't know any other language. Secondly I don't want to start learning a new language or I'll get confused. Thirdly you can easily make Perl scripts into Win32 executables so you can compile Perl.

Could you give me a link to this 'B' module? I can't seem to find anything about it (though it was only a quick look as I had work)

acid_kewpie 12-05-2005 02:44 AM

it's part of the core perl system, check perldoc

kylomonkey 12-05-2005 05:00 PM

Look into the command perlcc it comes with the standard perl distrubution.
It Should do the job for you

All times are GMT -5. The time now is 02:31 PM.