I've got a large array (12k+ elements) of hashes and I would like to to sort this array by one of the keys in the hashes. When I was testing the logic with only a few hundred elements, this code
was working nicely. But when I tried sorting the complete data set, I encountered out of memory errors.
I believe the path forward is to output each record to disk as it's generated, and then sort the file on disk later. It appears that Chris Nandor's File::Sort module would do the trick, although I suspect it may require a change from using Data::Dumper to writing one record per line. This isn't a problem, but is there a cleaner way to do this?