When i cut the file into about 500 lines it worked fine, but with my test file of 2800 lines it put out the wrong output. I have it running. I used:
while(<$file>){
...
}
and just used an arbitrary line counter to have it start processing the code once it hit line 14 and above. I just tested similar code but just had it read the file into the array and then print it out to a text file and checked the text file and it was all there so what I was seeing in eclipse was misleading (I think it breaks it into 1000 line chunks to make it easier to read through manually).
And I totally just had an 'aha' moment. I was parsing the date out of each line to test it against another file I had to make sure the lines I was comparing are the same date and time. Initially I was only taking the date from line 14 because I at first didn't realize one file would have multiple dates. So when I changed it to parse the date from every line I forgot to change the date reading from
$fileContents14 to $fileContents$x
So it wasn't looking like it was going through all the info because the test of making sure the same date is being tested failed for the whole document. And when I tested with only 500 lines the date changed to the correct date within the first 14 lines.
I don't know if much of that made sense without knowing what the program does and stuff but I now feel stupid for posting this question. I seriously played with this for hours before posting and couldn't figure it out, though.

In reply to Re^2: reading file into an array by vassago
in thread reading file into an array by vassago

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.