in reply to Changing the return number for "die"
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.
|
|---|