http://qs1969.pair.com?node_id=321915


in reply to Re: What's #! got to do with it?
in thread What's #! got to do with it?

so all other "shebang lines" are really just plain old comments.

Not quite. It might still try to parse that line for options. Which is why you can still get the Too late for "-T" option at taint_test.pl line 1. error when calling a program as perl file.pl with -T set on the file's shebang line.

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

: () { :|:& };:

Note: All code is untested, unless otherwise stated

Replies are listed 'Best First'.
Re^3: What's #! got to do with it?
by Coruscate (Sexton) on Jan 16, 2004 at 21:29 UTC
    Not quite. It might still try to parse that line for options. Which is why you can still get the Too late for "-T" option at taint_test.pl line 1. error when calling a program as perl file.pl with -T set on the file's shebang line.

    That's why I said qq{so all the other "shebang lines"} (ie: any shebang lines following the first one) :)

      That is not true, either. For instance,
      #line 500 "Source file"
      will set tokens __LINE__ to 500 and __FILE__ to Source file. See pp. 618-619 in the Camel, 3rd ed.