: I'm writing perl scripts that will be distributed to locations where I
: cannot gaurantee the location of perl. Is there a clean alternative to the
: shebang with the specific perl path? Maybe using an environment variable to
: locate perl?
This may be a heavier solution than you were looking for, but you could
package the script in a module. The recipients would then use the usual
module installation procedure:
perl Makefile.PL
make
make test
make install
Scripts installed this way will automatically have their shebang lines
edited for the perl that built the module.
It also gives you the opportunity to check for pre-requisites, run
tests before installation, and include a README and Changes file.
(I don't know for sure, but you may need to create a dummy module file
for this to work.)
This may not solve your problem in the short term, but it's something
to think about if you're going to maintain the script regularly for the
long haul.
"perldoc ExtUtils::MakeMaker" for more info.
-- tdk