Click to See Complete Forum and Search --> : Perl - Very basic newbie question


John E
August 21st, 2010, 09:01 AM
I'm just taking my first steps into Perl programming. I'm following a book called Perl in Easy Steps by Mike McGrath. The only thing I've learned so far is that every Perl script needs to begin with something called the "she-bang line" which is basically a line that declares the location of the Perl interpreter on the user's system.

Maybe I'm missing something - but isn't that a bit dumb for a language that claims to be cross-platform? (since the Perl interpreter is bound to be in a different location on different platforms). Surely there must have been a more intelligent way of finding the interpreter, rather than having its location hardwired into every Perl script :confused:

PeejAvery
August 21st, 2010, 02:54 PM
PERL is part of all UNIX and Linux based systems, so the systems install location will always be the same. And, the shebang is not required in Windows.

The reason it's there is for custom PERL installs not tied to the OS base.