in reply to Re: How to get die() to stop printing a line number?
in thread How to get die() to stop printing a line number?

Well I think we can both agree that it comes down to a matter of personal preference. I didn't mean to imply with my original post that there would never be a reason to not show a line number, rather the original poster seemed to want to just exit his program with no output, which is what exit is for, where as die indicates some kind of error occured.

Update: Why on earth was this modded down? Its not a flame and I don't believe that it is wrong either.

Lobster Aliens Are attacking the world!

Replies are listed 'Best First'.
Re: How to get die() to stop printing a line number?
by Abigail-II (Bishop) on Jul 02, 2003 at 15:13 UTC
    Actually, a die() is quite different from an exit(), even you don't generate output with die(). If you want something equivalent, you'd need to do:
    exit $! ? $! : ($? >> 8) ? ($? >> 8) : 255;

    and pray $SIG{__DIE__} wasn't set, and that the code was not inside eval {}.

    Abigail