uva has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: i need help in difference
by marto (Cardinal) on Feb 09, 2006 at 13:37 UTC
Re: i need help in difference
by xdg (Monsignor) on Feb 09, 2006 at 14:34 UTC

    I'm going to assume that the underlying question is why different exit values are useful or how they should be used or handled. This is complicated, as it's not necessarily consistent across platforms.

    Much of what exit codes do can better understood by reading the documentation for how Perl gets the exit codes back from programs that it runs -- e.g. with system and $? -- and related docs on portability:

    • system

    • perlvar (look at the entry for $? and the section on "Error Indicators")

    • perlport (look for system)

    -xdg

    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Re: i need help in difference
by mickeyn (Priest) on Feb 09, 2006 at 13:37 UTC
    the expression returned by the exit is the 'exit status' which will be read (and maybe dealt with) by whoever is executing the code and recieves it (shell, eval ...).

    different exit statuses can be useful for figuring which kind of error occured in the program.

    Enjoy,
    Mickey

Re: i need help in difference
by Fletch (Bishop) on Feb 09, 2006 at 13:34 UTC

    What part of the rather extensive documentation for exit did you not bother to read understand that's left you confused?