system("./some_command_that_might_set_ENVs.sh"); if ($? == -1) { print "failed to execute: $!\n"; }