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


in reply to Re^3: Get the order of HTTP request headers
in thread Get the order of HTTP request headers

The perlsec passage to which you linked says the order shouldn't be assumed to be random. The perlrun passage to which you link doesn't explicitly mention changing key orderings at all. It is not the purpose of the feature to alter the key ordering, much less making it random.

Two problems with your assumption:

But enough theory. Let's look at a practical example:

for (1..100) { my %h; $h{$_} = 1 for 'a'..'z'; print(join('', keys(%h)), "\n"); }
wraxdjyukhgftienvmslcpqbzo wraxdjyukhgftienvmslpcqbzo wraxdjyukhgftienvmslpcqbzo wraxdjyukhgftienvmslpcqbzo wraxdjyukhgftienvmslpcqbzo wraxdjyukhgftienvmslpcqbzo ... wraxdjyukhgftienvmslpcqbzo wraxdjyukhgftienvmslpcqbzo

And the same if I run the program again.