Your code looks really nice and I think I may be able to use it, or at least a approach similar to this, the only question that is flagged is how would this handle data from a file that uses one patteren through out the file? It seems this line in my OP was over looked "in all I am working with four files and this is the only one that differs like this."

While one of the four is semicolen delimited so I am just doing a split and removing the extra whitespace, that leaves the file in which my sample output was from and two other files which have their own patteren

A short break down of the files could be put as:

  1. File 1: semicolen delimited
  2. File 2: fixed 02:10:33:15:19:10:3:18:6:4 & 02:98:11:9
  3. File 3: fixed 2:35:14:14:14:19:25:11:16
  4. File 4: fixed 2:20:20:2:11:8:10:10:03:3:4
If it helps here is some sample output from file 3 and file 4 File 3:
028088 00000005402.6000000000000.0000000 +000000.002011-04-19 12:00:00ALICIA MARIA LOPEZ BAZZOC00101893559 0213262 00000000000.0000000000000.0000000 +000000.002011-04-19 12:00:00INDEGOLF S.A. 00101893559 029052 00000002927.4000000000000.0000000 +000000.002011-04-19 12:00:00INDEGOLF (ALICIA LOPEZ) 02800898617 027550 00000000000.0000000000000.0000000 +000000.002011-04-19 12:00:00ALICIA LOPEZ (INDEGOLF)02855262166 029051 00000000000.0000000000000.0000000 +000000.002011-04-19 12:00:00ALICIA MARIA LOPEZ BAZZOC02800898617 028085 00000000000.0000000000000.0000000 +000000.002010-10-20 12:00:00INDEGOLF, S. A. 00101893559
File 4:
02CAFETERIA, ,MARI 0000000000000009822507+0009403.20201104150032018 +74313748210172100005 02RAMON, BRITO 0000000000000009817407+0108815.92201104150032018 +74413748210172100005 02EAST COAST CHART 0000000000000009851407+0002838.60201104150032211 +49915931210382100005 02INMOBILIARIA PAL 0000000000000009770507+0001345.18201104150029156 +70515250210202100005 02IGLESIA ESPIRITU 0000000000000009755607+0001031.74201104150032018 +60213748210172100005
This is why I have it reading in the first file that way it loads the correct template for the data that I am parsing. I regret not giving output from the other files at the time I orginally posted, I wasn't even sure if my post would make it through the area that I live in was part of the area affected by the storms that went through the southeast U.S.


In reply to Re^2: Working with fixed length files by vendion
in thread Working with fixed length files by vendion

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.