Vincent Lefevre on Wed, 12 Jan 2011 11:11:26 +0100

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Path to perl

On 2011-01-11 11:50:22 -0800, Jeroen Demeyer wrote:
> An even better solution might be using #!/usr/bin/env perl, which does
> not assume a fixed location for perl (useful for binary distributions).

or if the user (without root access) installs a version in his home dir.

>  Unfortunately, with "/usr/bin/env perl" you can't add the -w flag to perl.

How about:

eval 'exec perl -w -S $0 ${1+"$@"}'
    if $running_under_some_shell;

Even without -w, this may even be better for the few systems without

Vincent Lefèvre <> - Web: <>
100% accessible validated (X)HTML - Blog: <>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)