eval { # try # dein Code }; if ($@) { # catch # dein Fehlerbehandlungscode }