$rv = system("uname"); print "Returned a $rv and \$? is $?\n"; $rv = system("ver"); print "Returned a $rv and \$? is $?\n";
Unix produces:
SunOS Returned a 0 and $? is 0 Returned a 65280 and $? is 65280
Windoze produces:
Bad command or file name Returned a 0 and $? is 0 Windows 98 [Version 4.10.1998] Returned a 0 and $? is 0
In reply to RE: Answer: Obtaining a return code
by turnstep
in thread Obtaining a return code
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |