in reply to exec, system, or backticks
Updated:
From perldoc -f system:
You can check all the failure possibilities by inspecti +ng $? like this: if ($? == -1) { print "failed to execute: $!\n"; } elsif ($? & 127) { printf "child died with signal %d, %s coredump\ +n", ($? & 127), ($? & 128) ? ’with’ : ’without +’; } else { printf "child exited with value %d\n", $? >> 8; }
I see you are not using the return value (system) nor the output (backtick). I recommend you to use system and allways check the return value of the process.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: exec, system, or backticks
by tc1364 (Beadle) on Oct 20, 2004 at 16:02 UTC |