in reply to out of memory problem

using a perl compiled for 64 bits would probably help...

But, do you really need to maintain three level of hashes? that would be a complete memory hog for most kinds of data.

Maybe storing everything in just one hash as $row{$a, $b, $c} = $d could suit your needs.

And consider using SQLite also.