$DBI::errstr contains the error message for the last DBI error that has occurred. $DBI::errstr retains the value until another error occurs, at which time it is replaced with the new error message. If no DBI errors have occurred, $DBI::errstr contains undef.