Checking $? should just work, if the program you called reports the exit status correctly. If what you call is a shell script or other program you wrote, check if it exits with the correct exit status.
For example this works for me
$ perl -we 'system "true"; print $?,$/;' 0 $ perl -we 'system "false"; print $?,$/;' 256
In reply to Re: return status from system()
by ambrus
in thread return status from system()
by shilpam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |