Have a look at ${^CHILD_ERROR_NATIVE} in this Q&A node. How do I get both the return value and text? backticks vs. system().
Update: You'll notice the status value from backticks is returned to $? but perl adds a byte on the end so you need to shift it 8 bits to the right to get the code. That being said I've had problems with third party executables that had large return values. $? wasn't large enough to hold both the Perl added byte and the original 32 bit return code.
In reply to Re: Capture return value from a cmd when it errors
by Lotus1
in thread Capture return value from a cmd when it errors
by sravs448
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |