eval { $newSeriesSth->execute() || die $newSeriesStr->exrrstr; }; if ($@) { if ($@ =~ /duplicate/) { print "Trying to insert duplicate row.\n"; } else { die "Unhandled errer. DBI says: $DBI::errstr"; } }
In reply to Re: Anonymous sub as error handler
by dreadpiratepeter
in thread Anonymous sub as error handler
by CubicSpline
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |