develooper Front page | perl.perl5.porters | Postings from December 2010

Re: perl5-porters Digest 6 Dec 2010 14:15:25 -0000 Issue 6678

Thread Previous
From:
John P. Linderman
Date:
December 6, 2010 06:57
Subject:
Re: perl5-porters Digest 6 Dec 2010 14:15:25 -0000 Issue 6678
Message ID:
20101206145706.50DA12E533@research.att.com

Oh, please don't.  That won't even work with most versions of unix.
#! doesn't do a path search, so unless you have a perl command in
the local directory, you'll get an (obscure) "not found" warning
(it's the command on the shebang line that is not found, not the
command containing the shebang line).  I've seen

#!/usr/bin/env perl

(Plain old env won't work for the same reason that plain old perl
will not), but that just replaces one arbitrary location with
another, and the temptation to write

#!/usr/bin/env perl -w

will also elicit an obscure warning.  -- jpl

====

demerphq suggested:
> Well then maybe it should just be
>
> #!perl
>
> and make no assumptions about where it is in the path.


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About