Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

RE: Answer: Obtaining a return code

by turnstep (Parson)
on May 21, 2000 at 20:36 UTC ( #14041=note: print w/replies, xml ) Need Help??


in reply to Re: Obtaining a return code
in thread Obtaining a return code

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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://14041]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2019-11-23 01:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (113 votes). Check out past polls.

    Notices?