in reply to Modifying %ENV From The Shebang Line

The "-*- perl -*-" bit is just for Emacs's benefit, so you should try leaving it off (you can always use a local variables section at the end instead).
  • Comment on Re: Modifying %ENV From The Shebang Line

Replies are listed 'Best First'.
Re^2: Modifying %ENV From The Shebang Line
by ikegami (Patriarch) on Dec 17, 2007 at 23:42 UTC
    That's not true. Perl needs it or else it will run the #! line when it notices "perl" isn't present in it.
      I stand corrected. I had forgotten (or maybe never read) that part. The full details in perlrun are much too long to quote, but here's one relevant passage:
      If the #! line does not contain the word "perl", the program named after the #! is executed instead of the Perl interpreter. This is slightly bizarre, but it helps people on machines that don't do #!, because they can tell a program that their SHELL is /usr/bin/perl, and Perl will then dispatch the program to the correct interpreter for them.