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

Re: I can't get this to run!

Thread Previous | Thread Next
From:
Peter Scott
Date:
April 28, 2002 17:53
Subject:
Re: I can't get this to run!
Message ID:
4.3.2.7.2.20020428175505.00aaf620@shell2.webquarry.com
At 05:20 PM 4/27/2002 -0700, drieux wrote:
>>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
>irrelevant.

Beep, no.  Observe:

$ perl
#!/foo/bar/perl -T
Too late for "-T" option at - line 1.

The line is *not* ignored.  The path is ignored, but the options are still 
read out and set.  Another demonstration of this:

$ perl
#!/foo/bar/perl -w
print
Use of uninitialized value in print at - line 2.
^D
$ perl
print
^D
$

Peter Scott
peter@psdt.com
http://www.perldebugged.com


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About