in reply to Passing DBI database handles
Code doesn't matter much here
Actually, it probably does matter. Can we see the code that's failing? Your basic approach should work, so it's probably a coding detail.