sub SQL { $dbh = DBI->connect("DBI:mysql:DBname","$un","$pw") || Terminate('Sorry, Disconnecting' . $DBI::errstr); # Prints error . $_[0] } # END SQL