in reply to Running perl in a system that doesnt have perl..........

This is a question which can be broken up into several ones.

I'll start with what is perl, and what is Perl within perl.

perl is the Perl interpreter. It reads source code of the language Perl, and at the same go runs it. Compilation and runtime are fused into one process (kind of, but lets not get pesky), which is done over and over again.

C (and other compiled languages) is turned into machine language - something the actual processor/operating system understands.

In order to acheive what you want, you need to find a way to represent the code compiled into memory, by the interpreter, on disk, in a way that is understandable by the operating system. You can package the interpreter and the perl code into one binary executable using several development environments (i think the activestate suite supports something like that), or on unix, you can use CORE::dump, as documentat in perlfunc.

You can also do something with the various B:: modules, but i feel i have no right telling you about them, as i haven't the faintest clue how to use them.

The problem with running Perl without perl is that there are many dynamics between the two. It's hard to rethink of everything making a package, and thus the only natural way to do this is to include perl, and your Perl, in the same binary executable, in a way that the section which is perl reads data from the section which is your code, and runs it.

I hope i've shed a bit of light, and am sorry for the confusion that i may have caused. Currently and simply it's impossible to run a Perl program without perl installed, somehow. There are various ways of getting around this, but none involve ignoring this completely. The B:: namespace is your friend, in this case, i think.

Update: http://www.perldoc.com/perl5.8.0/bin/perlcc.html perldoc perlcc might be of use.

-nuffin
zz zZ Z Z #!perl
  • Comment on Re: Running perl in a system that doesnt have perl..........