try( sub{ # code that dies }, catch(sub { # code that checks vs. $_ } ) );