[Israel.pm] Best way to invoke a script in Unix

Ephraim Dan E.Dan at F5.com
Sun Oct 14 07:22:34 PDT 2007


Usually "env" is used to be more portable, since /full/path/to/perl can
vary from system to system, and "env" will just search for "perl" in the
path.  "env" has its own pitfills too, though.  Wikipedia has a decent
summary:
http://en.wikipedia.org/wiki/Shebang_(Unix)#Solving_shebang_problems_wit
h_the_env_program
--edan

-----Original Message-----
From: perl-bounces at perl.org.il [mailto:perl-bounces at perl.org.il] On
Behalf Of Yossi Itzkovich
Sent: Sunday, October 14, 2007 16:00
To: Perl in Israel
Subject: [Israel.pm] Best way to invoke a script in Unix

Hi,

I used to start all my scripts with:
#! /full/path/to/perl

I saw others who used  env (perl) among other ways.

Is there a "best" way to do it ?  What are the cons and pros for each
way ?


Thanks

Yossi
_______________________________________________
Perl mailing list
Perl at perl.org.il
http://perl.org.il/mailman/listinfo/perl



More information about the Perl mailing list