in reply to Re: Portable Shebang
in thread Portable Shebang

Thanks for the pointer to perlman:perlrun - that was a good read.

Just one more question maybe: how does one get the -w switch when using the /usr/bin/env trick?

Regards... Stefan
you begin bashing the string with a +42 regexp of confusion

Replies are listed 'Best First'.
Re: Re: Re: Portable Shebang
by VSarkiss (Monsignor) on Oct 12, 2001 at 18:37 UTC

    Hmm.... I couldn't coax it to do that on my Linux box. It appears env expects the shell to have split up the arguments before they're handed to it, so when execve hands it one long string of file and arguments, it thinks the blanks are part of the file name. That's judging from the error message I get: env: perl -w: No such file or directoryThat's not such a big deal with -w since you can substitute use warnings, but is a problem with -T, which has to appear early on. There may be some clever way to do with the env trick. I think I'll just stick to regular ol' shebangs....