in reply to dbmopen mistake?

I suppose that's because there is actually no data in your hash. Perhaps something went wrong in the dbmopen call and you didn't see it because you're not using strict/warnings? Or you declared the hash using "my" in one function but aren't passing it to the other one as a reference? Without a real code snippet it's hard to tell.

By the way, are you sure you want to use dbmopen? That's basically a legacy function, have a look at BerkeleyDB.pm and tie.