# called from sub foobar() which in turn # is called from foo() which in turn... sub do_something { ... try { stuff(); } catch Error::Sys with { # handly any System error right here }; # any other error will go up the call tree.. } #### # called from sub foobar() which in turn # is called from foo() which in turn... sub do_something { ... eval { stuff(); }; my $err = $@; if ($err =~ m/SYSTEM:/) { # handle any System error right here } elsif ($err) { # any other error will go up the call tree.. die $err; # rethrow } }