If I try to connect, and it fails, because this server is off line, my perl-script generates a message (to screen!!) that it failed. I don't want this message to screen.
Comment on Re^2: how to test a connection with mysql db
Pass PrintError => 0 as an option in your connect string. From perldoc DBI:
The "\%attr" parameter can be used to alter the
default settings of "PrintError", "RaiseError", "Auto
Commit", and other attributes. For example:
$dbh = DBI->connect($data_source, $user, $pass, {
PrintError => 0,
AutoCommit => 0
});