develooper Front page | perl.beginners | Postings from April 2002

Re: I can't get this to run!

Thread Previous | Thread Next
April 27, 2002 17:20
Re: I can't get this to run!
Message ID:

On Saturday, April 27, 2002, at 03:20 , Shaun wrote:

>>  $ perl /usr/lib/cgi-bin/agbot/agbot.cgi
>> and it works just fine..  Huh?  I don't get it..
> That's because the shebang line is ignored when you prefix the script with
> the perl command.

you are correct - but I prefer to assert it the other way around,

when the perl interpretor is invoked with a file - it reads and
executes the perl way - hence #<foo> is parsed as comment and is

when a 'script' is invoked - hence it is executable - it is passed
to the interpreter listed in the 'sheBang' - coming as we all know
from 'sharp bang' for the 'pound bang' - "#!" that precedes the
interpretor on line one - on some systems one could invoke 'the
default interpretor' - which was 'configurable' by putting


on line one.

which 'auto runs' the file as

	<interpretor> <file_invoking_interpretor>

the fun of course is to Zone Out and do:


and watch /bin/sh freak at the perl code


and watch the perl compiler errors...



Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About