Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Can't figure out the realtive ordering.

by sundialsvc4 (Abbot)
on Sep 26, 2011 at 13:01 UTC ( #927853=note: print w/ replies, xml ) Need Help??


in reply to Can't figure out the realtive ordering.

The elements of a hash can be obtained in some-sorted order using the each() function, with certain limitations.   And, you will sometimes see while loops which iterate over sort keys(hashvar).

The elements of an array do not change position, unless elements are inserted or removed.   The ordering of a hash should be considered by you to be “unpredictable.”   (A hash is designed to champion rapid and consistent access-speed, and retrieval order is the price that you pay.)


Comment on Re: Can't figure out the realtive ordering.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (9)
As of 2014-10-01 11:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (9 votes), past polls