in reply to Logging the results of 'die'

I haven't used it with DBI error, but how about:
BEGIN { use CGI::Carp qw(carpout); open(LOG, ">>/path/to/my/log") or die("Unable to open log: $!\n"); carpout(LOG); }

best,
sz