Syntactic Confectionery Delight | |
PerlMonks |
Re: Mysterious hash behaviourby Zaxo (Archbishop) |
on Apr 07, 2005 at 06:57 UTC ( [id://445556]=note: print w/replies, xml ) | Need Help?? |
Hashes are not ordered. The list returned by keys does not preserve either insertion order or any ordering by value. With consecutive small numbers as keys, you can preserve order by using an array, instead. After Compline,
In Section
Seekers of Perl Wisdom
|
|