#! perl use strict; use warnings; use Exception::Class::TryCatch; try eval { my $bar = baz(); die 'baz failed!' if $@; }; if (my ($second, $first) = (catch, catch)) { print "(1) $first(2) $second"; } sub baz { try eval "1 = 2"; }