in reply to return value from system call, exit status, shift right 8, bitwise and, $?
or would the following suffice? : system('foobar') == 0 or die "Failed!";
Because I hate bit twiddling, that would be my choice.
Also, as "Learning Perl(5th)" says in a footnote on p. 236:
The return value of system is the "child exit code multiplied by 256, plus 128 if core was dumped, plus signal number triggering termination, if any."So you can do some regular math to get any additional information you need as well.
|
|---|