if you think the return code should be zero,

then the return from usage() should likely be zero too
unless ( scalar(@ARGV) ) {
    usage();
    exit 1;
}

As a convict myself, I could be wrong... smile

-- BramVanOosterhout - 23 Feb 2009

Hum, I doubt it should be 0 after usage(). usage() means the user tried something that's not supported (here: tried to run it without arguments, and without -A), thus the script fails, thus it exists non-zero.

The problem reported was that, when called with -A, it doesn't require any argument, and works perfectly. So it should exit 0, as it succeeded.

Check Support.Question72 for a full history on this.

-- OlivierRaginel - 24 Feb 2009

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads