The lower eight bits of $? contain the signal that terminated the process.if ($? >> 8) { print "Error " }
There's more info in the perldoc POSIX documentation. In particular, see the documentation for the functions WEXITSTATUS and WIFEXITED.
Note that you shouldn't always trust the status code since it is possible for the command to terminate (like via a signal) before it has a chance to set it.
In reply to Re: DNScmd in perl script
by pc88mxer
in thread DNScmd in perl script
by ajd335
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |