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.
In reply to Re: return value from system call, exit status, shift right 8, bitwise and, $?
by 7stud
in thread return value from system call, exit status, shift right 8, bitwise and, $?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |