Keep in mind there's a difference between the dsn you set up under control panel...data sources(ODBC), and the dsn that dbi expects. If you set up a dsn under control panel named 'MADDY', then you can probably connect with:
my $dsn = "MADDY";
my $user = "Maddy17";
my $pw = "";
my $dbh = DBI->connect("dbi:ODBC:$dsn", $user, $pw, {
RaiseError => 1,
});