in reply to Re: wrapper script to conditionally exec different perls?
in thread wrapper script to conditionally exec different perls?
Thanks. I was too lazy to specify what went wrong when I replaced the bash "exec" script (meant to be /usr/bin/perl; let's call it "mywrapper") with a perl "exec" script. Here's what happened.
"mywrapper -v" produced the desired output, showing that the correct perl binary was invoked (perlY if perlY available, else perlX).
helloworld.pl is this:
#!/path/to/mywrapper use strict; print "Hello World!";
"/path/to/mywrapper helloworld.pl" caused helloworld.pl to run properly.
But executing helloworld.pl yields
line 3: use: command not found line 5: print: command not found
|
|---|