But $? is the same thing as just reading the return
value yourself, right? At any rate, $? on my Win32
system doesn't show anything except "0", no matter
what is in the system call:
$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
|