I have an array of records, and I need to print each record with the same third key one one row. If the data in a row does not match that of the previous column key it should go to the next line and so on.

I have been helped with the following code, it it only works for the first column key and need it to work with with third. Furthermore, I will not work with multiple records for example:

0<tab>761<tab>94 (041352) 0<tab>2311<tab> 94 (0.00) 0<tab>27<tab> 94 (NG012) 0<tab>892<tab>94 (04/23/2002) 0<tab>494<tab> 94 (520-004) 1<tab>343<tab> 38 (info) 1<tab>133<tab> 38 (info) 1<tab>345<tab> 94 (info)
Desired Output:
0<tab>761<tab>94 (041352) 0<tab>2311<tab> 94 .... 1<tab>343<tab> 38 (info) 1<tab>133<tab> 38 (info) 1<tab>345<tab> 94 (info)
Sorting is not need as in the code I am about to show you for the list has been sorted. I only need to compare by columns. In the first record, put all recs with 94s on one row:
.....94....94....94... .....38....38 .....94
Please help...
thanks

Edited: formatting dvergin 2002-05-10


In reply to Print record by column key by vanuatu10

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.