in reply to How to deal with Huge data

I think DBM::Deep would help. With it, you'd put your %data on disk, basically. Your code would be mostly the same except: