No such thing as a small change | |
PerlMonks |
Anonymous sub as error handlerby CubicSpline (Friar) |
on Sep 09, 2002 at 13:33 UTC ( [id://196257]=perlquestion: print w/replies, xml ) | Need Help?? |
CubicSpline has asked for the wisdom of the Perl Monks concerning the following question:
Greetings Monks. I'm a beginning-intermediate Perl programmer and am currently working on a pretty simple DBI-based program. The focus of my question, however is not DBI-specific. Rather, it's a question about using (I believe) anonymous subroutines. What I want to do is catch it when one of my DBI statements fails. Depending on the error that caused the failure, I may want to just continue on or I may want to quit. My question is two-fold:
Code follows, with questions in the comments:
Now, given that this is acceptable programming (which it may not be), the special bonus question is why do I get this error message while running this code?
~CubicSpline
Back to
Seekers of Perl Wisdom
|
|