Re: #!$var/bin/perlby LAI (Hermit)
|on Mar 13, 2003 at 16:39 UTC||Need Help??|
Like hardburn said, the shebang line is interpreted by the system, not Perl. So, if you want to make sure all your systems have the right path set, I would suggest that you have a simple installation script that you run whenever you upload code. Recurse through your root code directory and replace any perl shebangs you find with the right one.
If you call this as perl thisscript.pl the special variable $^X will insert the name of your perl executable as 'perl', so run it using /var/binaries/coolest/perl thisscript.pl or wherever your executable happens to be.
Note: This was written off-the-cuff, and thoroughly untested. Use this only as a guideline and test it thoroughly before actually using it on any production code. Seriously.
Update: you probably want to write a little shell script on each system, something to the effect of
That'll simplify your life a little.
Update: as I was cleaning the code a little I realized that this might actually have the happy effect of replacing the newlines in your perl files with your system's $/. I may be wrong, tho.