The input and output files are essentially the same. But here are some examples for you to look at. This first one is an input file:

2021090701070100000000026048002210000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000020 +000000000000000000000000000000000000000000000000000000000000000000000 +00 1101010701051012345678900001088812345672000807777211001745480000027020 +000000000100000000000000640009000000000000100000000000000000000000099 +991000D00Z00000000000000000000000000000000000000000000000000000000000 +00 1101010701051012309876540001098765432102000807777201001628280000047020 +014600000100000000000000640002000000000000100000000000000000000000099 +991000D00J00000000000000000000000000000000000000000000000000000000000 +00 2021100701070100000000026048002210000000000700000000230000000000000000 +000000000000000000000000000002300000000000000000000000000000000000020 +000000000000000000000000000000000000000000000000000000000000000000000 +00


This is the second input file:

2021090701070100000000026048002210000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000020 +000000000000000000000000000000000000000000000000000000000000000000000 +00 11010107010510123456789000010888123456720008XX555211001745480000027020 +000000000100000000000000640009000000000000100000000000000000000000099 +991000D00Z00000000000000000000000000000000000000000000000000000000000 +00 1101010701051012309876540001098765432102000800000201001628280000047020 +014600000100000000000000640002000000000000100000000000000000000000099 +991000D00J00000000000000000000000000000000000000000000000000000000000 +00 2021100701070100000000026048002210000000000700000000230000000000000000 +000000000000000000000000000002300000000000000000000000000000000000020 +000000000000000000000000000000000000000000000000000000000000000000000 +00


The output I expect to see is that the line where positions 14-16 starts "888" should have the extra rules applied and the one that has "987" should be transfered as is. In a perfect world this is the output I would expect to see:

2021090701070100F13000026048002210000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000020 +000000000000000000000000000000000000000000000000000000000000000000000 +00 1101xx07010510123456789000010888123456720008XX555211001745480000027020 +0xxx0000010000000000000064000x000000000xxx100000000000000000000000099 +991000D00x0000000000000000000000000000000000000xxxx000000000000000000 +00 1101010701051012309876540001098765432102000800000201001628280000047020 +014600000100000000000000640002000000000000100000000000000000000000099 +991000D00J00000000000000000000000000000000000000000000000000000000000 +00 2021100701070100F13000026048002210000000000700000000230000000000000000 +000000000000000000000000000002300000000000000000000000000000000000020 +000000000000000000000000000000000000000000000000000000000000000000000 +00
Thanks for your help.

In reply to Re^8: Ignoring lines in flat text file by sheasbys
in thread Ignoring lines in flat text file by sheasbys

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.