At 7:03 PM -0700 8/14/02, Robert D. Sharp wrote:
>caused a dangerous thing. Thought, I have had the pleasure of
>writing scripts on a Linux box (developmental) for Unix box
>(production) and had to provide for changes in that very line from
>one
>
>#! /usr/bin/perl
>to
>#! /usr/local/perl
>
>or back because of environment.
Well, there's always this disgusting solution.
------------
:
eval exec '`which perl` -S $0 "$@"'
if ($running_under_some_shell);
print STDERR "Hello World\n";
foreach $arg (@ARGV) {
print STDERR "Arg: $arg\n";
}
-------------
That should work under csh or sh, and find whichever perl is first in
the path. Test it with something like:
./foo 'args together' args separate
Then go wash your hands.
--
Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.