in reply to perl install prefix as an env variable
I use this little bit at the start of my scripts, as I run them on my local box with $HOME/tools/perl, and on the HP servers as /opt/perl5/bin/perl.
#!/bin/sh PATH=$HOME/perl/bin:$HOME/tools:/opt/perl5/bin:/usr/local/bin:$PATH export PATH exec perl -S -w -x $0 ${1+"$@"} #! perl -w #line 8
I got this one straight from perlrun. The same should work for you, but just change the $PATH to include the preferred perl version first.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: perl install prefix as an env variable
by Anonymous Monk on Mar 13, 2002 at 20:07 UTC | |
by jeffenstein (Hermit) on Mar 14, 2002 at 07:03 UTC |