in reply to trapping database errors

It looks like you have RaiseError set. If you set RaiseError to a false value, DBI will return on error conditions rather than dieing. You can then look at the returned value and $DBI::errstr or $dbh->errstr to figure out if it worked.

my $dbh = DBI->connect($connect_string,$user,$password,{ RaiseError=>0 + });
--- print map { my ($m)=1<<hex($_)&11?' ':''; $m.=substr('AHJPacehklnorstu',hex($_),1) } split //,'2fde0abe76c36c914586c';