Syntactic Confectionery Delight PerlMonks

Comment on

 Need Help??

First, thanks for the clarification.

However, as far as I can tell, what you are saying comes down to:

Two hashes containing identical keys and values, will iterate in different orders, unless they were constructed in exactly the same way.

For example:

```\$h1{ \$_ } = 1 for         'a'..'z';;
\$h2{ \$_ } = 1 for reverse 'a'..'z';;

print %h1; print %h2;;

w 1 r 1 a 1 x 1 d 1 j 1 y 1 u 1 k 1 h 1 g 1 f 1 t 1 i 1 e 1 n 1 v 1 m
+1 s 1 l 1 c 1 p 1 q 1 b 1 z 1 o 1
w 1 a 1 r 1 d 1 x 1 j 1 y 1 u 1 h 1 k 1 g 1 f 1 i 1 t 1 e 1 n 1 v 1 m
+1 s 1 l 1 c 1 p 1 b 1 q 1 z 1 o 1

And:

```@h1{ 'a'..'z', 'A'..'Z' } = (1)x52;;
delete @h1{ 'A'..'Z' };;

@h2{ 'a'..'z' } = (1)x26;;

print %h1; print %h2;;
a 1 d 1 j 1 y 1 u 1 k 1 g 1 t 1 e 1 v 1 s 1 c 1 q 1 b 1 z 1 w 1 r 1 x
+1 h 1 f 1 i 1 n 1 m 1 l 1 p 1 o 1
w 1 r 1 a 1 x 1 d 1 j 1 y 1 u 1 k 1 h 1 g 1 f 1 t 1 i 1 e 1 n 1 v 1 m
+1 s 1 l 1 c 1 p 1 q 1 b 1 z 1 o 1

And:

```@h{ 'a'..'z', 'A'..'Z' } = (1)x52;;
delete @h{ 'A'..'Z' };;

%h2 = %h;;

print %h; print %h2;;
a 1 d 1 j 1 y 1 u 1 k 1 g 1 t 1 e 1 v 1 s 1 c 1 q 1 b 1 z 1 w 1 r 1 x
+1 h 1 f 1 i 1 n 1 m 1 l 1 p 1 o 1
w 1 r 1 a 1 x 1 d 1 j 1 y 1 u 1 h 1 k 1 g 1 f 1 i 1 t 1 e 1 n 1 m 1 v
+1 s 1 l 1 p 1 c 1 q 1 b 1 z 1 o 1

In all cases above, two "identical" hashes were arrived at through a different sequence of operations; and that difference in the sequence of construction manifests itself in a different iteration sequence.

But that has always been the case!

The above is 5.10; but the same is also true going right back to my involvement with perl: 5.6.1.

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

Please don't take that the wrong way; I'm simply trying to understand exactly what difference(s) the latest changes have actually made?

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

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.
• 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?

Create A New User
Chatterbox?
 choroba has worked for a Molecular Genetic Lab [choroba]: also, Rosalind has nice explanations of the basic terms [choroba]: but I've never used BioPerl, I processed all the stuff myself

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2017-08-17 09:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
Who is your favorite scientist and why?

Results (285 votes). Check out past polls.

Notices?