Hi, I have the following -
$coord_{"AB"}{1} = [420,520,870]; $coord_{"AB"}{2} = [220,520,470]; $coord_{"AB"}{6} = [320,320,270]; $coord_{"AB"}{7} = [520,720,370]; $coord_{"AB"}{8} = [620,520,670]; $coord_{"PL"}{12} = [420,520,570]; $coord_{"PL"}{13} = [220,520,170]; $coord_{"B"}{2} = [320,720,670]; $coord_{"B"}{4} = [520,520,170]; $coord_{"B"}{5} = [620,820,370];


and I wish to print out -

AB 1 = X:420,Y:520,Z:870
AB 2 = X:220,Y:520,Z:470
AB 6 = X:320,Y:320,Z:270
AB 7 = X:520,Y:720,Z:370
AB 8 = X:620,Y:520,Z:670
PL 12 = X:420,Y:520,Z:570
PL 13 = X:220,Y:520,Z:170
B 2 = X:320,Y:720,Z:670
B 4 = X:520,Y:520,Z:170
B 5 = X:620,Y:820,Z:370

how would I do this exactly - using a for or foreach loop.
Thanks,
Barry.

In reply to iterating through a 2 dimensional hash by Baz

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.