in reply to Keeping Perl DBI Quiet

There are two attributes of the database handle which control how DBI handles errors. RaiseError causes DBI to die on an error. PrintError causes DBI to warn on an error. The default has PrintError on and requires checking each call for errors. To save checking each call, it is common to turn RaiseError on and PrintError off.

It is possible to turn of both of them off. This is dangerous because it is easy to forget to check a database call and wonder why your code is not working. I suggest turning off error reporting only for the statements you know might fail:

{ local $dbh->{RaiseError} = 0; local $dbh->{PrintError} = 0; $dbh->do($sql_that_might_fail); }