Perl: the Markov chain saw | |
PerlMonks |
Re: Mysterious hash behaviourby davido (Cardinal) |
on Apr 07, 2005 at 07:02 UTC ( [id://445558]=note: print w/replies, xml ) | Need Help?? |
Yes, the explanation is that hashes do not maintain order. You can not count on the keys being in any particular order, unless you sort them too. This is documented behavior. See perlintro: "Hashes have no particular internal order, though you can sort the keys and loop through them." Dave
In Section
Seekers of Perl Wisdom
|
|