in reply to hash components out of order
Hashes are by definition unordered. If you need the insertion order to be preserved you'll have to resort to something like Tie::IxHash.
The cake is a lie. The cake is a lie. The cake is a lie.