$ perldoc -f die
die LIST
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. ... snip ...
Let's see how this works.
$ perl -e '$! = 10; die "blah\n"' blah $ echo $? 10
Seems to work as described in the doco.
In reply to Re: bad die behaviour?
by bruceb3
in thread bad die behaviour?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |