eval{ ...code...}; if ($@) { handle error } #### use Error; try{ do something... }catch Error::Simple with{ handling... }finally{ ... }