in reply to Re: Bug with Carp and $!/$?
in thread Bug with Carp and $!/$?

Oh, I expected to get the value of $! (which I set to 10). The reason I set $? is that the 'die' manpage states:

Outside an "eval", prints the value of LIST to "STDERR" and exits with the current value of $! (errno). If $! is 0, exits with the value of "($? >> 8)" (backtick `command` status). If "($? >> 8)" is 0, exits with 255.

I was trying to make sure that $? would be non-zero, although it just occurred to me that I should've done something like: $? = (9 << 8) in order for that to work.