# Connect to MySQL server $Dbh = DBI->connect($DSN, $Config{'MYSQL_USER'}, $Config{'MYSQL_PASSWD'}, { PrintError => 0, RaiseError => 0 }); if ($DBI::err) { if ($Dbh) { $Dbh->disconnect} print "Error! we had an error connecting to CMS DB: ".$DBI::errstr; } # continue code