system returns the status of the command returned by wait. Typical unix commands and C functions return '0' on success (ie, there was no error)
See the following example:
$ perl -e '$var = system("true"); print "[$var]\n"' [0] $ perl -e '$var = system("false"); print "[$var]\n"' [256]
Update: oops... shift 8 places to get the status of the command. 'false' should have returned '1':
$ false; echo $? 1
In reply to Re: Do and Die
by jhourcle
in thread Do and Die
by jimbus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |