in reply to How do I print errors

Or if you only wanted to collect certain errors, you could try something like this. *untested
sub print_error{ open( OUTFILE, ">> $destination" ) or die "Couldn't open file for +reading.$!\n"; print OUTFILE $_[0]; close OUTFILE } my $dbh = DBI->connect( "dbi:ODBC:RETQC_SQL", "sa", "", {RaiseError => + 1, PrintError => 1, AutoCommit => 0} ) or print_error("Unable to con +nect: $DBI::errstr\n");
Might be what you want