I read in an Excel file and sent it to an output file. I then read in the output file into a multidimensional array.

I know how to access specific elements. That's not the problem. For exemple here is a snippet from the output file:

ID NAME 1 2 M D S
M001 C0001 215 221 401 402 0
M001 C0002 214 217 401 402 0
M001 C0003 189 209 401 402 0
M001 C0004 0 0 401 402 0
M001 C0005 0 0 401 402 0
M002 C0043 149 152 401 402 1
M002 C0044 243 243 401 402 1
M002 C0045 228 244 401 402 1
M002 C0046 116 119 401 402 1
M002 C0047 118 118 401 402 1

Ok, what I need to to print all the alleles for fish M002 and then a line and then for M002

Basically, theoutput needs to be
M001
215 221 214 217 189 209 0 0 0 0

M002
149 152 243 243 228 244 116 119 118 118
Any help would be appreciated?

In reply to accessing multidimensional arrays by bmoore

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.