in reply to Re: Dev Hashbang
in thread Dev Hashbang

env is generally fine, but note that in this case you can't pass any arguments on the shebang line, because most kernels do split/pass everything after env as one argument.  For example

#!/usr/bin/env perl -w ...

would produce (on Linux)

$ ./824155.pl /usr/bin/env: perl -w: No such file or directory

Replies are listed 'Best First'.
Re^3: Dev Hashbang
by shmem (Chancellor) on Feb 19, 2010 at 15:12 UTC

    Good point! particularily on a web server (as per the OP), where you want taint checks:

    !#/usr/bin/perl -T
Re^3: Dev Hashbang
by Anonymous Monk on Feb 19, 2010 at 14:46 UTC
    pl2bat
    eval 'exec perl -x -S "$0" ${1+"$@"}' if 0; # In case running under some shell
    Easier to install with MakeMaker