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: $!";
In reply to Re: System calls from CGI script
by Corion
in thread System calls from CGI script
by whitdan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |