http://www.perlmonks.org?node_id=1002878


in reply to Read Hash reference from File

If you need order, use arrays. Or if hashes are just to convenient for the data, add an order counter to the data and sort the references into an array. This array can be created after you have read in the hash, kept alongside the hash in memory and is valid as long as the hash doesn't change.