Think about Loose Coupling | |
PerlMonks |
Re: return value from system call, exit status, shift right 8, bitwise and, $?by ikegami (Patriarch) |
on Feb 11, 2010 at 09:10 UTC ( [id://822610]=note: print w/replies, xml ) | Need Help?? |
No, the low 7 bits indicate the signal that ended the process. Bit 7 indicates whether a core dump was saved.
system itself encountered an error. For example, system will return -1 and set $! if the program to execute is not found.
It can also be written as
It will die on any error, but not saying what failed and not saying why it failed seems insufficient to me. The user should at least be told what failed for an error that's not a programming error; a line number doesn't cut it. Now, detecting whether a code dump occurred or not is going overboard. This is pretty minimal:
In Section
Seekers of Perl Wisdom
|
|