Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Hash order randomization is coming, are you ready? (perlfaq4)

by Anonymous Monk
on Jul 19, 2013 at 07:22 UTC ( #1045279=note: print w/ replies, xml ) Need Help??


in reply to Hash order randomization is coming, are you ready?

Has perlfaq/perlfaq4 been "vetted" for this issue of hash order randomization?

@hash1{ keys %hash2 } = values %hash2;


Comment on Re: Hash order randomization is coming, are you ready? (perlfaq4)
Re^2: Hash order randomization is coming, are you ready? (perlfaq4)
by Corion (Pope) on Jul 19, 2013 at 07:36 UTC

    For a single hash, keys and values are (still) guaranteed to return the items in the same order, as long as the hash remains unmodified between the calls; see keys. This means that this exact line still keeps working. Doing otherwise would likely break much code in very hard to detect ways.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2014-12-27 23:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls