[wellylug] Perl on server

Daniel Pittman daniel at rimspace.net
Mon Dec 8 18:38:53 NZDT 2008


Kevin O'Riordan <kfor at compsoc.com> writes:
>>>> #!/usr/local/bin/perl
>
>>> you might need to edit the first line to become the right path for
>>> your perl executable
>
>> I'm aware of the path requirement, thanks.
>
> As a by-the-way, the perlrun(1) manpage suggests using
>
>    #!/usr/bin/env perl

This is not portable, thanks to some BSD derived systems that only have
/bin/env, not /usr/bin/env.  Portability, you have to love it.

> or an ugly shell eval/exec hack, to avoid explicitly specifying the
> path to the perl binary.

This is vastly more portable.  Nicer, well...

Regards,
        Daniel



More information about the wellylug mailing list