in reply to Re: Re: Consistent order of (keys %hash)?
in thread Consistent order of (keys %hash)?

The fact that repeated calls to keys %hash always returns the exact same thing right down to the order of the keys isn't an implementation detail; it is documented behavior. If you don't modify %hash, then you can be assured that the order of items returned by keys, values, and each is consistant no matter how many times you call them.

A tied hash that violates this rule would be rather strange. Even DB* hashes obey this rule.

It is an important rule because it allows code like:     %copy{keys %hash}= values %hash; to work (which efficiently merges %hash into %copy).

        - tye (but my friends call me "Tye")