suaveant has asked for the wisdom of the Perl Monks concerning the following question:
I find, however, that I want to change which perl I am executing only for my sandbox so I can work on switching codebase from perl 5.6.1 to 5.8.3 while allong everyone else to go on their merry way.
It occurred to me that I should be able to replace the dynamic link with a perl or shell script, or C program that could choose which perl to run based on an environment variable that gets set for sandbox code already.
I tried the following:
Wrapper
#!/prod/gnu/bin/perl exec '/prod/gnu/bin/perl', @ARGV;
Caller
I get#!/home/ant/test/perl print "Hello world\n";
What am I doing wrong.. or stupid? Worse comes to worse I can search replace all the shebang lines... but I'd like to avoid that. Not really worried about efficiency, this is just temporary.[ant@gums2-sun]$ ./test2.pl ./test2.pl: print: command not found
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Conditionally executing different versions of Perl
by blokhead (Monsignor) on Oct 18, 2006 at 21:46 UTC | |
by MidLifeXis (Monsignor) on Oct 19, 2006 at 17:28 UTC |