in reply to general hash questions

Perl doesn't impose artificial restrictions on such things as how big a data structure can grow. In fact, it places very few artifical restrictions, period. It might be considered an artifical restriction that the regular expression engine is not re-entrant, but that's a stretch. And there is a warning that gets spit out if you dive too deep into recurision, unless you turn off the warning. That's somewhat contrived. But generally, no you don't have to worry about Perl preventing you from consuming 100% of your memory and swapfile space with gigantic datastructures.

As for storing your hashes, you might also look at using a data serializer such as Storable. But in the immediate, your problem seems to have already been solved by remembering not to expect lexicals to behave like package globals.


Dave