in reply to Can't call method "errstr" on an undefined value
The connect call failed, returning an undefined value for $dbh, so you have to use $DBI::errstr to find the error. See the DBI documentation for details.