in reply to
The strange ordering of hash values
Because hashes are not ordered.
If you were to change the second line to:
@values = sort values(%hash);
[download]
..then you might get the output that you expect.
Comment on
Re: The strange ordering of hash values
Download
Code
In Section
Seekers of Perl Wisdom