in reply to Portable Shebang
Why not just use #!perl -w without the explicit path, so the perl interpreter will be found if it is in $PATH?As has been already said, that doesn't work, unless Perl just happens to be in the current directory. $PATH-searching is unknown to the kernel.
Or {...} use #!/usr/bin/env perlBecause env might be in /bin, might be in /usr/bin, or might be nowhere at all, so it's not that much more portable than just saying /usr/bin/perl and telling the user to patch if necessary (or creating an installation tool to do that automatically).
-- Randal L. Schwartz, Perl hacker
|
|---|