On Sunday, April 28, 2002, at 05:57 , Peter Scott wrote:
> 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 > $ My complements on this - since the other case is even sillier: [jeeves:~] drieux% sh /tmp/drieux/junk.pl /tmp/drieux/junk.pl: command not found: use [2] hello World [jeeves:~] drieux% cat /tmp/drieux/junk.pl #!/foo/bar/perl -T use strict; print "hello World\n"; [jeeves:~] drieux% Obviously I need to grow out my collection of 'Perl Sillies' where I keep track of the underlying bits and bobs of what is actually being parsed and dealt with.... ciao drieux --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]