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,
Zaxo
In reply to Re: Mysterious hash behaviour
by Zaxo
in thread Mysterious hash behaviour
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |