On 20/04/12 23:07, Tony firshman wrote:
One has a first line for Linux - #!/usr/bin/perl/  - which points to the 
compiler.

It's better to use:

        #!/usr/bin/env perl

because it's cross distro. Linux is <supposed to be> standard, but different distro's put things in different locations. So, your file may not run on my laptop and vice versa if we used the hard coded path to the perl compiler (or whatever).

Using /usr/bin/env will find the perl compiler no matter where it lives on my $PATH or yours.

Of course, what puzzles me is the fact that I'm being told to avoid hard coding paths to perl, or python, or shells etc by hard coding the path to "env" instead - but I rather suspect that env *is* in a standard location.


Cheers,
Norm.

--
Norman Dunbar
Dunbar IT Consultants Ltd

Registered address:
Thorpe House
61 Richardshaw Lane
Pudsey
West Yorkshire
United Kingdom
LS28 7EL

Company Number: 05132767
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to