![]() |
|
laziness, impatience, and hubris | |
PerlMonks |
Re^4: Hash order randomization is coming, are you ready?by demerphq (Chancellor) |
on Mar 29, 2013 at 13:56 UTC ( #1026154=note: print w/replies, xml ) | Need Help?? |
So, if I understand correctly, the code you posted is visibly broken and has been for a very long time. Well yes, it is broken, that was my point for bringing it up :-). Whether it is visibly broken or not depends on whether you have any collisions. In the case you posted there are two sets of collisions, 4 and 1, and 3 and 0. (You can tell because they reverse each copy in earlier perls.) However if changed it to be 1,2,3,5,7,8 you would not have any collisions and the order would appear the same. Eg try:
In 5.18 the order will be different for every hash. No exceptions. Here is what perlfunc will say in 5.18:
--- $world=~s/war/peace/g
In Section
Meditations
|
|