sub try (&$) { my($try, $catch) = @_; eval { $try }; if ($@) { local $_ = $@; &$catch; } } sub catch (&) { $_[0] }