eval { # calls go here }; if ($@) { # exception handling here }