Backticks are documented to return undef on errorAnd to further clearify, that's errors regarding the execution of the given program. The OP also mentions getting the return value - a non-zero exit code means (by convention) that the executed program encountered an error. In that case, backticks will not return undef. However, even backticks set $?, so the return value can be found as $? >> 8.
In reply to Re^2: Capture external program return value
by JavaFan
in thread Capture external program return value
by llancet
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |