Alternatively, replace exit $err_no; with ($! = $err_no) && (die());.sub _die { my $err_no = shift; my @msg = @_; print STDERR join "\n",@msg; exit $err_no; }
Then call _die($err_num, "This thing is dead.") when you want the alternate behavior.
In reply to Re: Changing the return number for "die"
by radiantmatrix
in thread Changing the return number for "die"
by han_perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |