in reply to Undescribed problem with Win32::OLE

It would help if you told us what you were seeing as a problem. Also, things like what version of Perl, what OS, and what the basic purpose of what you're doing ...

The most obvious problem I'm seeing is that $sql is defined well after any time you use it.

A few helpful pointers:

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.