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

How do I find out what the return code from a system() call means? Sorry, I looked all over google and couldn't find an answer for this seemly simple question.

Replies are listed 'Best First'.
Re: Return codes from a system() call
by Fletch (Bishop) on Jan 28, 2008 at 17:52 UTC

    That's because it's only seemingly simple. The return value is whatever exit status the command you executed returned. The only general convention is that 0 indicates success and not-zero means something went some degree of wrong. You have to look at the documentation for whatever it is you ran to know exactly what it means when /usr/bin/fnord exited with status 23.

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

      Oh, okay. This makes more sense to me now. Thanks for the help!
Re: Return codes from a system() call
by moritz (Cardinal) on Jan 28, 2008 at 18:11 UTC