in reply to running backwards on a hash

If preserving the order in which the keys are inserted into a hash and getting them back out in the same order is important then you might want to look into the  Tie::IxHash module.

A search on  Tie::IxHash will turn up many useful posts.

HTH,

--Jim