These are good rules, if you have a good reason to break them, feel free to:
Use #!/usr/bin/env perl , where possible, for portability between heterogeneous systems. But this is a dumb way to do this because it makes the assumption that Perl, which is the first in the way, is also the Perl that you always want. This may not be the case, and usually when there are several Perls in the system, they exist for a reason.
The best approach is to package the scripts in a distribution ready for CPAN. Distribute distributions on the systems where you want to install them and install them in the usual way (manually or using the CPAN toolchain), indicating the full path to perl or cpan . During this process, the shebang string is rewritten to the correct Perl path.
Examples:
tar -xvf Local-OurCompany-Scripts-1.000.tar.gz cd Local-OurCompany-Scripts-1.000 ## automated installation /usr/bin/cpan . # or perhaps /opt/ourcompany/perls/perl-5.14.2/bin/cpan . ## manual installation /usr/bin/perl Makefile.PL ; make ; make install # or perhaps `which perl5.14.2` Makefile.PL ; make ; make install
daxim
source share