Messages in this thread | | | Date | Tue, 23 Mar 1999 15:01:48 +0100 | From | (Tor Arntsen) | Subject | Re: [OFFTOPIC] #!perl - alternative path to script interpreters |
| |
David Luyer <luyer@ucs.uwa.edu.au> writes: >Ahhh. Hence the other bit I remembered but couldn't find. There is >some trick to put the word perl on the first line in a way it will be >ignored. I couldn't remember what it was or why so I left it out and just >changed /usr/bin/perl to /bin/sh (the script I quoted from was #!/usr/bin/perl >originally) :-(
I posted it already:
: # -*-Perl-*- eval 'exec perl -w -S $0 ${1+"$@"}' if 0;
And this also works: #!/usr/bin/env perl
if you want that -w thing you can add a second line if you're using perl5: BEGIN { $^W = 1; }
- Tor
(I think the point must be that it should be portable, a linux-only solution just don't cut it. The above tricks work fine, so why don't we just forget about clever new Linux-only hacks? I'm not going to post more on this issue anyway.)
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |