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


in reply to Perl interpretation of weird #! line

As others have said, what you have is a shebang line for a script that has not yet been deployed.

What is to the right of the #! has no effect on Windows systems, as these find perl using a file type association, or the script gets turned into a .bat file with a different preamble. If the line could be parsed into a perl command and options, e.g. -w these options would be applied.

Unix systems expect to see the full path to perl. Sometimes #!perl will work via $ENV{PATH}, but this is considered unreliable and insecure.

The standard script installing mechanism used by ExtUtils::MakeMaker invokes MY->fixin over each script. This will cause your placeholder shebang line to be replaced with a real one that has a path to perl. The fixin method does different things depending on your platform, for example it runs pl2bat on Windows.

On Unix, fixin does the following:

--

Oh Lord, won’t you burn me a Knoppix CD ?
My friends all rate Windows, I must disagree.
Your powers of persuasion will set them all free,
So oh Lord, won’t you burn me a Knoppix CD ?
(Missquoting Janis Joplin)

  • Comment on Re: Perl interpretation of weird #! line