in reply to Problems connecting to server 2

I noticed in your first post that you were creating the complete connect string, I would advise continuing this practice.

By using a DSN, you cannot pick up the script and move it to another box without replicating the DSN. Also, if the local box is re-genned, re-installed, etc you risk losing the DSN.

Also, really consider having the sa password changed from the default of no password. Create a user with relevent permissions and try to avoid doing things as sa. (Unless of course you are the admin and these scripts require sa usage). Everyone knows SQL Server defaults sa to null. This is a gaping security hole.

Good luck, Perl/ODBC/MSSQL can get along quite nicely.