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


in reply to #!/usr/bin/perl vs. -*- perl -*-

My reading of perlrun suggests that Perl's behaviour is subtle:

The #! line is always examined for switches as the line is being parsed. Thus, if you're on a machine that allows only one argument with the #! line, or worse, doesn't even recognize the #! line, you still can get consistent switch behavior regardless of how Perl was invoked...
appears to say that:

So, Perl does more or less what you want. It has partly adopted the #! convention, so that even if it has no bearing on where the perl interpreter is run from, it still affects switches -- in a system independent manner.

Update: except for -T as brother Hue-Bond points out below :-(