There are many things that I could comment about in your code, but I don't have time to give you a tutorial.

However I'll suggest that the odds are very good that your bug is that you're misunderstanding the file format in some way. For instance it may be that the input you're getting doesn't use a standard return separator, so every way you have of reading it results in all of the data being put into one "line" with all of your versions of the program. Your parse program takes this data and then only reads the first line of data from it, and throws away as junk the rest of that "line" (ie the rest of your input).

To have any hope of helping you we'd need to know more about the format of the data.

An incidental tip. Fixed-format data formats are notoriously easy to mess up. I'd suggest that at least one of your fields have a "sanity check" that reports if it gets data that doesn't look reasonable. This will help you notice things like off-by-one errors.


In reply to Re: Wierd File pipe problem... by tilly
in thread Wierd File pipe problem... by bferlin

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.