On Friday 21 July 2006 12:24, Jerry DuVal wrote:
> Any way to catch a die message? I want to catch a die message from a sub
> routine, log it, and continue with a different sub routine.
>
>
>
> Thanks in advance,
>
>
>
> Jerry

You could call the subroutine from an eval block and check the value of $@ to 
see if an exception was thrown. Maybe something like:

eval { &some_sub };
$sub_err = $@ if $@;

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to