in reply to Re: Boolean (was Boolian) operators defy my understanding...
in thread Boolean (was Boolian) operators defy my understanding...
I appreciate your comments and example code.
I also have also found similar code (http://perldoc.perl.org/functions/system.html):
You can check all the failure possibilities by inspecting $? 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'm curious as to what determines the use of 127 and 128 in this script, and what is meant by "$? >> 8"?
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Boolean (was Boolian) operators defy my understanding...
by ikegami (Patriarch) on Jun 21, 2007 at 17:33 UTC |