Rolf: I showed where that came from in the post of a few days ago where I posted the entire program. I have a hash, %threads. The key is a string $thread, and the value is an array of numbers. This is how I printed the hash after it was constructed: foreach $thread (keys %threads) { print "$thread: @{$threads{$thread}}\n";} And that worked properly, exactly as expected. The code I posted here was an attempt to transfer the end arrays from members of the hash to members of an array. I initially tried to transfer each array as a whole. That gave me the problems I described in the previous post. The answers I got then didn't help, so I thought I'd try to do less cleverly, and transfer the elements of the array rather than the whole array. That's where the index $i comes from.

In reply to Re^2: syntax of multidimensional arrays and hashes by hsfrey
in thread syntax of multidimensional arrays and hashes by hsfrey

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, details, 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, summary, 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.