In article <slrn80bk3o.4fr.m.ram
...@melian.forwiss.uni-passau.de>,
Martin Ramsch <m.ram
...@computer.org> wrote:
>Motivation:
>I'd like to start my perl scripts using
> #! /bin/env perl
>because this way the perl interpreter should be searched in the
>current command PATH and I don't have to hard-code the path to the
>perl binary.
On most systems, either /bin is a link to /usr/bin, or it has a /bin/env.
However,
I don't think that would work. When the kernel executes the script (via
the #! feature) it uses the argument as the program to execute. (and I think
the name of the file as the last command line arguemnt.
So you would effectively be running "/bin/env perl foo.pl" which I don't
think would do what you want.
There might be a way to do it... by
untested:#!/bin/sh -c eval `/bin/env perl`
But I doubt it -- You might only be allowed one option. It'd be better to
install a link to perl in some standard path and refer to that.
Check for the link during installation, and update the path if neccessary.
--Joe
--
IBM's vision is apparently to make IBM hardware "scream with Microsoft
software" --The Register, http://www.theregister.co.uk/990927-000003.html
I have visions of screaming with (at and about) Microsoft software, too.