Try:
$ chmod a+x test.pl $ ./test.pl
The env utility *supports* passing arguments to the command .... if invoked from command line (with args split by shell). As part of shebang, however, all following arguments are passed to env as a single string. So if you don't have a command such as "perl -wls" on the $PATH, the result is a failure.
In reply to Re^4: How do I use 'which' in the hash-bang line? (updated)
by Anonymous Monk
in thread How do I use 'which' in the hash-bang line?
by rje
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |