eval { might_die() }; if ($@) { # handle exception }