Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: error handling with dbi

by 1nickt (Canon)
on Feb 16, 2016 at 16:09 UTC ( [id://1155367] : note . print w/replies, xml ) Need Help??


in reply to error handling with dbi

You are calling undef() on your DB handle, rather than testing to see if it's defined.

Try changing:

if ( undef $dbh ) {
to:
if ( not defined $dbh ) {
Hope this helps!


The way forward always starts with a minimal test.