As long as you can download and install the "DB2 Connect" package for Windows (which manages the ODBC connection to DB2), you will be able to do this easily using DBI and the DBD::ODBC driver. You create a DSN using DB2 Connect that contains the info for your DB2 database, and point the DBI at that DSN. Not sure if DB2 Connect can be downloaded for free anymore.