Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Mysterious hash behaviour

by Zaxo (Archbishop)
on Apr 07, 2005 at 06:57 UTC ( [id://445556]=note: print w/replies, xml ) Need Help??


in reply to Mysterious hash behaviour

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://445556]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-04-26 08:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found