Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://94102]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2017-08-16 14:09 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (266 votes). Check out past polls.