From: Randal L. Schwartz Date: Sun, 09 Jul 2006 14:02:13 GMT Subject: Re: [Patch] Using 'perl' in *.sh Message-ID: <86ejwuuba2.fsf@blue.stonehenge.com> In-Reply-To: <200607091441.16161.michal.rokos@nextsoft.cz> >>>>> "Michal" == Michal Rokos writes: Michal> I have no problem with that. I can set $PATH. Michal> But then I'd suggest to change magic #! Michal> from #!/usr/bin/perl Michal> to #!/usr/bin/env perl Michal> for *.perl Michal> It that what you meant? No, don't do that. Use the path to Perl that they chose during configuration because (a) it might not be the first one in PATH (b) even if it's the first one in *my* path, it might not be the first one in *everyone's* path (c) env requires an *extra* fork/exec (d) some systems don't have env The env hack is a nice hack, but it's just a hack. Don't rely on it when the right thing is nearby. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!