in reply to Hash error

You do realize that a Hash Table has its own idea of the order of the keys?

If key order is really important to you, then you need to either use a module that keeps track of the order under the covers; sort the keys into the 'proper order' and then retrieve the values based on the sorted-key; or accept the fact that Hash order is in neither time-sequence nor alphabetical-order.

----
I Go Back to Sleep, Now.

OGB