in reply to Re: Handling weird return values with or die
in thread Handling weird return values with or die

Perl functions as it does to be a good fit to intuition and natural language.</p?

A shell process's return value is the only way (aside from whatever it may have written to stderr) that status can be checked. Since there are many interesting ways for a process to fail, the ability to return different error codes is useful. Hence 0 == success, 0 != error_code.

It takes some getting used to.

After Compline,
Zaxo

  • Comment on Re: Re: Handling weird return values with or die

Replies are listed 'Best First'.
Re: Re: Re: Handling weird return values with or die
by mvaline (Friar) on Jul 05, 2001 at 17:15 UTC
    I see; since boolean true would refer to any value above 0 and false only refers to to 0, and the fact that multiple error codes are much more useful than multiple success codes :-), zero has to be the success code. Thanks!