Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Perl try { } catch(e) { }by Superfox il Volpone (Sexton) |
on Mar 03, 2015 at 14:16 UTC ( [id://1118605]=perlquestion: print w/replies, xml ) | Need Help?? |
Superfox il Volpone has asked for the wisdom of the Perl Monks concerning the following question:
Hi there, I am looking for a way to implement the construct: I know this snippet from Programming Perl 4th ed,pp 329, and it works using locals: And this works as try { ... } catch { print("Exception caught: $_"); }; I'd like to refer the exception with something like catch(e){ ... }. I would prefer to avoid using any external module such as TryCatch for portability reasons. Thanks s.fox
Back to
Seekers of Perl Wisdom
|
|