Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 lurking in the Monastery: (5)
As of 2014-09-21 01:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (165 votes), past polls