First, thanks for the responses. I really appreciate the help.

So I've been fiddling with it, and both read and readline bring in 50 bytes at a time as described (I can get that part working). However, all of the data I need will be within the first 100 characters (was using 50 before just to get the hang of it).

Right now using read and readline I am grabbing the first 100 characters, then the next 100 characters, which either grabs text from the same line, or it can grab text from the next line. Would there be a way to grab the first 100 characters of a line, then move onto the next line ignoring everything after the first 100 characters of that line? Basically truly only looking at the first 100 characters of each line?

For example, here are the first 100 characters of the text file I am looking at (for the line I want):

{|2013-11-26_11.50.21|LOGIN|1384639152462.653|ATOMIC|2013-11-26_11.50.21|#|default|(nameRedacted)|B0+9D+B

All the data I want is within the first 100 characters. I just need to grab the date and name of the person for every line containing LOGIN.

Other lines of the text file contain non-login information, and I don't need any of that info so I need to search for lines that contain LOGIN within the first 100 characters (parse it and grab data) and ignore any line not containing it.


In reply to Re^4: Out of Memory - Line of TXT too large by MajinMalak
in thread Out of Memory - Line of TXT too large by MajinMalak

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.