http://www.perlmonks.org?node_id=1006244


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

Will the order of keys returned change from one call to the next on the same has in the same run of a script? Is there an explicit shuffle done every time you call keys etc?

Consider the code:

my $hashRef = someFuncCall(); my $keys1 = join(' ', keys %$hashRef); my $keys2 = join(' ', keys %$hashRef); print "Key order is not stable" if $keys1 ne $keys2;