my $dbh = DBI->connect( $DSN, $username, $mysqlpassword ); if ($dbh) { say "Connected to the MySQL database."; } else { say "Catastrophe! Connection failure with DSN '$DSN': $DBI::errstr"; }