The code works for me. It may be I am running on windows and you on unix. Any ideas an how to modify the hash to get this to work?

another sample input

4201034500194 1212104039252 001 + 4201034300473 1212104034111 001 + 4201034300473 1212104033180 001 + 4201034300473 1212104039098 001 + 4201034300473 1212104039097 001 + 4201034300473 1212104039098 001 + 4201034300473 1212104039098 001 + 4201034600043 1212104034111 001 + 4201034600043 1212104033180 001 + 4201034600043 1212104039049 001 + 4201034600043 1212104039396 001 + 4201034600043 1212104039443 001 + 4201034600043 1212104039295 001 + 4201034600043 1212104039995 001 + 4201034500194 1212104033298 001 + 4201034500194 1212104039252 001 + 4201034500194 1212104039539 001 + 4601034500194 1211104039140 001 + 4201034100433 1212104367958 001 + 4201034300473 1212104039097 001

output as my code is written now

CH 01034500194 1212104033158 001 LAB CH 01034500194 1212104033240 001 LAB CH 01034500194 1212104039241 001 LAB CH 01034300473 1212104034111 001 LAB CH 01034300473 1212104033180 001 LAB CH 01034300473 1212104039098 001 LAB CH 01034300473 1212104039097 001 LAB CH 01034300473 1212104039098 001 LAB CH 01034300473 1212104039098 001 LAB CH 01034600043 1212104034111 001 LAB CH 01034600043 1212104033180 001 LAB CH 01034600043 1212104039049 001 LAB CH 01034600043 1212104039396 001 LAB CH 01034600043 1212104039443 001 LAB CH 01034600043 1212104039295 001 LAB CH 01034600043 1212104039995 001 LAB CH 01034500194 1212104033298 001 LAB CH 01034500194 1212104033158 001 LAB CH 01034500194 1212104033240 001 LAB CH 01034500194 1212104039241 001 LAB CH 01034500194 1212104039539 001 LAB CH 01034100433 1212104367958 001 LAB CH 01034100433 1212104367958 001 LAB CH 01034100433 1212104367959 001 LAB

In reply to Re^2: hash help by cesear
in thread hash help by cesear

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.