in reply to random behaviour of perl hashes

During one process, the order given by each, keys and values will stay the same as long as the hash doesn't change.

The order is not guaranteed to be the same if you start a new interpreter - i.e. running a perl program twice will probly not give the same order.

Replies are listed 'Best First'.
Re^2: random behaviour of perl hashes (rarely)
by tye (Sage) on Aug 28, 2006 at 21:49 UTC
    i.e. running a perl program twice will probly not give the same order.

    s/probly not/almost always/, actually. But the "almost" is the important part. (: Don't rely on the order not changing, but you'll be even more disappointed if you try to rely on the order not staying the same.

    - tye