SPUG: she-bang lines: "/usr/bin/perl" vs "/usr/bin/env perl"

veritosproject at gmail.com veritosproject at gmail.com
Sat Apr 14 12:45:33 PDT 2007


Perl now has a ./Configure option that automatically symlinks
/u/b/perl to /u/l/b/perl if you so choose.

On 4/13/07, tcaine at cac.washington.edu <tcaine at cac.washington.edu> wrote:
>
> /usr/bin/env will search your PATH for perl.  If I download a script that
> has the "#!/usr/bin/env perl" she-bang line and my perl is located at
> /usr/local/bin/perl and /usr/local/bin is in my path then the script
> should still work without needing to modify the she-bang line.
>
> I still prefer the #!/usr/bin/perl she-bang line myself, as not all env
> exucutables live in /usr/bin anyways (athough it usually does) and if you
> have more than one version of perl in your PATH you get the first one env
> finds, which may not be the one you expect.
>
> On Fri, 13 Apr 2007, Michael R. Wolf wrote:
>
> >
> > I'm familiar with this one:
> > #! /usr/bin/perl
> >
> > I've seen this one, but can't think of why it would be better:
> > #! /usr/bin/env perl
> >
> >
> > Ideas?
> >
> > Michael
> >
> > P.S.  The "Hello World" code bubbles use the second form.  I'm curious why.
> >
> > --
> > Michael R. Wolf
> >    All mammals learn by playing!
> >        MichaelRWolf at att.net
> >
> _____________________________________________________________
> Seattle Perl Users Group Mailing List
>      POST TO: spug-list at pm.org
> SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list
>     MEETINGS: 3rd Tuesdays
>     WEB PAGE: http://seattleperl.org/
>


More information about the spug-list mailing list