I think that you will have to program the humans, eg send a Readme out with the
scripts and let them do a little editing to get the script to run. If you do
not know where Perl is or it is not on the path then you cannot run it so you
cannot do any searching. We could call it Hobson's choice ;-)
"Hobson, Neville" wrote:
> I'm writing perl scripts that will be distributed to locations where I
> cannot gaurantee the location of perl. Is there a clean alternative to the
> shebang with the specific perl path? Maybe using an environment variable to
> locate perl?
> The camel book suggests the following:
>
> #!/bin/sh --
> eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
> if 0;
>
> Is this the best alternative and are there situations in which it might not
> work?
>
> Neville
>
>