in reply to different first line in perl

Here's an addendum to what others have said about the perl shebang. There's a disctinction between an installed script, and one that is distributed (to multiple target machines, to different hardware platforms).

The installed script should contain a shebang that points to the real perl image. On Unix O/S, anything else is a potential security risk. Windows doesn't care, and ignores the shebang line.

A distributed script can potentially have anything in the shebang line, provided it contains the word perl. Granted if you are developing in a Unix environment, it will need to be set to the perl path on the box you are developing on, if you want ./foo.pl to work.

To turn one or more distributed scripts into installed scripts involves changing the shebang line. On Windows it involves running pl2bat to wrap the script in a .bat file.

With standard CPAN installs, this process has been automated - add your script to the target exe_files (script_files for Module::Build), and the shebang magic happens during make install.

--

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)