in reply to Re: Re: Exception handling (alternatives)
in thread Exception handling (alternatives)
try { die "foobar"; } catch Error with { my $error = shift; print "failed: $error\n"; exit; }; print "ok";
Make sure you don't leave off the last semi-colon after the catch block, or it won't work.
|
|---|