in reply to System calls from CGI script
You empty out $ENV{PATH} at the top of your script. This is good.
But then, you expect $ENV{"PATH"} to still be available when you call system. That's not how it works.
Personally, I recommend that you hardcode the path to perl or use $^X for the path to the current interpreter:
my $perl = $^X; system($perl, $update_location) == 0 or die "Couldn't launch $perl: $!";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: System calls from CGI script
by whitdan (Initiate) on Nov 04, 2016 at 19:26 UTC |