Keep It Simple, Stupid PerlMonks

### Comment on

 Need Help??

Which makes me wonder whether your meditation isn't a little a) redundant; b) slightly scare mongery?

I think you missed the point. The order will change *every process*.

```\$ for i in {1..10}; do ./perl -le'%h=(1..20); print "\$]: ",join "-", k
+eys %h'; done;
5.017007: 1-13-5-15-19-9-17-11-7-3
5.017007: 13-19-5-17-9-15-1-7-3-11
5.017007: 13-7-19-15-5-1-11-17-3-9
5.017007: 17-13-3-7-15-1-9-5-11-19
5.017007: 17-9-3-11-7-15-1-19-5-13
5.017007: 19-1-11-5-9-3-15-17-7-13
5.017007: 9-19-3-17-7-11-13-15-1-5
5.017007: 1-11-15-3-19-17-7-13-9-5
5.017007: 19-7-13-1-5-17-9-3-11-15
5.017007: 5-19-9-1-13-17-7-3-15-11
\$ for i in {1..10}; do perl -le'%h=(1..20); print "\$]: ",join "-", key
+s %h'; done;
5.012004: 11-3-7-9-17-15-1-19-13-5
5.012004: 11-3-7-9-17-15-1-19-13-5
5.012004: 11-3-7-9-17-15-1-19-13-5
5.012004: 11-3-7-9-17-15-1-19-13-5
5.012004: 11-3-7-9-17-15-1-19-13-5
5.012004: 11-3-7-9-17-15-1-19-13-5
5.012004: 11-3-7-9-17-15-1-19-13-5
5.012004: 11-3-7-9-17-15-1-19-13-5
5.012004: 11-3-7-9-17-15-1-19-13-5
5.012004: 11-3-7-9-17-15-1-19-13-5

The order returned by 5.12.4 is what you should see on pretty much every modernish perl there has been released with the exception of 5.8.1 and 5.17.6 and later. And obviously in 5.17.6 the order changes pretty much every time.

What we discover when we per-process randomize the keys is that people actually depend on the key order more than they realize. When we make it random these dependencies become visible as bugs. I tend to consider them buggy originally, as minor changes to the history of the hash will produce roughly the same results as per-process randomization.

BTW, you *did* see that I said "none of this is new" right? So why the emphasis on "But that has always been the case"?

---
\$world=~s/war/peace/g

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

• Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
• Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
• Read Where should I post X? if you're not absolutely sure you're posting in the right place.
• Please read these before you post! —
• Posts may use any of the Perl Monks Approved HTML tags:
a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
• You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
 For: Use: & & < < > > [ [ ] ]
• Link using PerlMonks shortcuts! What shortcuts can I use for linking?
• See Writeup Formatting Tips and other pages linked from there for more info.

Create A New User
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2018-03-18 06:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
When I think of a mole I think of:

Results (228 votes). Check out past polls.

Notices?