in reply to bad die behaviour?
$ 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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: bad die behaviour?
by Anonymous Monk on Sep 10, 2007 at 12:04 UTC | |
by ikegami (Patriarch) on Sep 10, 2007 at 12:40 UTC | |
by Anonymous Monk on Sep 10, 2007 at 13:13 UTC | |
by ikegami (Patriarch) on Sep 10, 2007 at 13:26 UTC | |
by Anonymous Monk on Sep 10, 2007 at 13:38 UTC | |
| |
by bruceb3 (Pilgrim) on Sep 10, 2007 at 21:22 UTC |