in reply to The strange ordering of hash values
Hashes are unordered so the output order of values (and keys) has no relation to their creation order. You can use Tie::IxHash if you wish to preserve the order.