my $ODBCdriver = 'SQL Server'; my $SQLserver = 'FC4FA9\SQLEXPRESS'; my $SQLdatabase = 'test'; my $SQLuser = 'username'; my $SQLpassword = 'password'; my $SQLport = '12345'; $dbh = DBI->connect("dbi:ODBC:Driver={$ODBCdriver};Server=$SQLserver;Database=$SQLdatabase;UID=$SQLuser;PWD=$SQLpassword;Port=$SQLport", {PrintError => 0, RaiseError => 1, AutoCommit => $AutoCommit, FetchHashKeyName => 'NAME_lc'}) or die "Can't connect to the database: $DBI::errstr\n";