in reply to Querying a $dbh

Can I ask what you're trying to do? This sounds like a vaguely familiar problem, I'm trying to remember when I've seen it before. I think I was trying to write a set of routines that would have a $dbh passed in as an argument, but then I realized that the routines needed to know the connection parameters also (probably so they could reconnect if the connection was dropped, or something like that). It seemed neater to me to be able to just pass one piece of information rather than three or four, but that boxed me in later -- I think I resolved the problem by creating yet-another-class to handle making database connections, and so I had a new object that was less cagey about protecting the connection info.