http://qs321.pair.com?node_id=1207938


in reply to Memory utilization and hashes

I have used DBM::Deep to store native Perl hashes on disk persistently. And hashes of hashes, and hashes of arrays of ... you get the idea. It solves your problem.

It will be some factor slower (say, 5-10x) because of disk writes. There is a maximum file size, so depending on your data, you may need multiple subhashes each mapped to its own file.

But if your problem is easily solved another way, staying in memory, you'll probably be happier.

-QM
--
Quantum Mechanics: The dreams stuff is made of