eval { &something_that_throws_exceptions }; if ( $@ ) { &exception_handler }