Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://927853]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2018-02-21 23:32 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (288 votes). Check out past polls.