> Which is not really portable with command line options, due to how
> env(1) works on OS X:
> 
> $ <test
> #!/usr/bin/env perl -wl
> print "hello world"
> 
> $ ./test
> env: perl -wl: No such file or directory

That is both against the documentation (env(1)) and the UNIX spec,
so I think a bug report to Apple is in order.  (Actually, env as such
seems to be working okay, so it is more likely a bug in the #! processing.)

> A different trick that I have not tested on other unix systems (as I
> just use '#!/usr/bin/perl') is to do the following:
> 
> $ <test
> exec perl -wl <<EOF
> print "hello world"
> 
> $ ./test 
> hello world

Reply via email to