in reply to storing hash in temporary files to save memory usage

There are many file-based hashing modules, eg. BerkeleyDB::Hash, mod:/DB_File, DBM::Deep etc. But each have their own strengths and weaknesses depending upon how you need to use them.

Which, if any of them, is right for your application depends very much on:

  1. the nature of your data:

    Are these simple key/value pairs or can the values themselves also be hashes or arrays?

  2. the nature and pattern of usage:

    Is this a one-off thing? Ie. do you build the filed hashes once, run your processing, and then discard those files?

    Or do they get reused many times?

  3. Will the filed hashes be accessed from a single process?

    Or multiple concurrent processes?

  4. Are the processes accessing these hashes long running processes that open the files once and then do lots of processing?

    Or are they short lived processes (eg. webserver sessions) that open the file, access one or two keys and then close them again?

If you give us a clearer picture of the nature of the nature of the data and the processes accessing it, we could probably give you far better suggestions for which modules or methods most likely fit your needs.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.