eval { # Code that might die }; if ($@) { # Catch area }