git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] perl shebangs: Use /usr/bin/env, not /usr/bin/perl

From
TATor Arntsen <tor@spacetec.no>
Date
May 21, 2010, 15:26 UTC
Message-ID
<AANLkTikGS4vjsjTj_hIClT_KEWhH1zaacyKhBM70Qgb6@mail.gmail.com>
In-Reply-To
<A612847CFE53224C91B23E3A5B48BAC74483234EEB@xmail3.se.axis.com>

On Fri, May 21, 2010 at 17:15, Peter Kjellerstedt <peter.kjellerstedt@axis.com> wrote:

Show 5 quoted lines
> This does not work. You cannot give arguments to an application
> started via /usr/bin/env; it will interprete everything after
> /usr/bin/env as the application name and fail with:
>
> /usr/bin/env: perl -w: No such file or directory

Yep. It would have to be changed to /usr/bin/env perl and add BEGIN {$^W = 1;} to the script.

That been said, I've used /usr/bin/env perl for customer applications for years and years, without problems. Things wouldn't have worked otherwise, because on e.g. IRIX systems the /usr/bin/perl version would be 5.005 and the /usr/freeware version would be 5.6.1.BUt the caveat is that you'll need to change -w to the above.

-Tor
Previous: Ævar Arnfjörð BjarmasonNext: Randal L. Schwartz
Message 6 of 10 in “perl libs: perl -w + use warnings is redundant”
  1. perl libs: perl -w + use warnings is redundantÆvar Arnfjörð Bjarmason, May 21, 2010
  2. perl shebangs: Use /usr/bin/env, not /usr/bin/perlÆvar Arnfjörð Bjarmason, May 21, 2010
  3. Peter KjellerstedtMay 21, 2010
  4. Ævar Arnfjörð BjarmasonMay 21, 2010
  5. perl shebangs: Use /usr/bin/env, not /usr/bin/perlÆvar Arnfjörð Bjarmason, May 21, 2010
  6. Tor ArntsenMay 21, 2010
  7. Randal L. SchwartzMay 21, 2010
  8. Jeff KingMay 21, 2010
  9. 1/2 perl libs: perl -w + use warnings is redundantÆvar Arnfjörð Bjarmason, May 21, 2010
  10. Ævar Arnfjörð BjarmasonMay 21, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.