How do you figure?
Looking at your code:
sub foo { ... try { fooFoo($ssh); } catch { warn "warn cought one: $_"; }; $ssh->exit_session; $ssh->close_session; }
What I mean is that you should let your exceptions go uncaught for upper levels where they can be handled properly. There is no reason to couple the exception catching with the cleanup code.
In reply to Re^6: exiting a subroutine neatly (Throwable)
by salva
in thread exiting a subroutine neatly
by Mavebe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |