in reply to Out of memory!!??

You can combine Storable with DB_File to create a memory-low but disk using solution. You only need something like Storable because your hash is multi-level. If you can avoid that then all you need is DB_File.

There are suites that store deep structures automatically, but they don't come with perl — which is sometimes an issue on platforms where perl is installed under /opt/.

Otherwise, have a gander at DBM::Deep.

-Paul