Let's say that the name of the database is 'foobar', located in '\\server\path\to\db\'... What's my DBI->connect supposed to look like?
I've looked at the DBI docs... but I'm utterly confused :)
I got sent a document with the query and everything (they used to run it in Excel) and the connection part looks something like this:
DSN=foobar;Directory=L:\path\to\db;SERVER=NotTheServer
...if that helps :)
odbc_dsnis the ODBC Data Source Name (a name used to refer to a set of driver-specific connection parameters which are typically the ODBC driver to use, the database name, etc.).
It's much easier to use the MS ODBC32 wizard found in the Control Panel to setup the DSN and use rather than the second option which requires you to put together the entire connection string.
So, using the DSN information they gave you, your connection would be:
my $dbh = DBI->connect("dbi:ODBC:foobar")
or die "Cannot connect at this time: $DBI::errstr\n";