Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re (tilly) 5: Seeking Feed back

by tilly (Archbishop)
on Jul 05, 2001 at 18:01 UTC ( #94102=note: print w/ replies, xml ) Need Help??


in reply to Re: Re (tilly) 3: Seeking Feed back
in thread Seeking Feedback on Chat Program (was Seeking Feed back)

Actually $? is not a boolean. As documented in perlvar, it is the return code of the last system call. That is 0 for success, and all else is an error. If the error is under 256, then it is a system error. If the error is over, then divide by 256 and you have the program's return code. The return code of your programs are set by exit, are 0 by default, and are set from $? on a die.

Unfortunately that means that every program has its own possible meanings for exit codes. Traditionally, however, 1 means "Error, but not an important one" and 2 means "Bad error". For instance rm on my system will return 1 if you don't give it any files to delete, but a 2 if you try to delete something and it can't.


Comment on Re (tilly) 5: Seeking Feed back

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2014-10-20 09:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (75 votes), past polls