in reply to Question about reading a file...

Sorry for commenting after you already found a solution. I too am curious as to how you solved it.

I like BioLion's solution, except I would add regular expressions to definitively identify which of the 3 log lines you have. In other words, make sure that you are grouping the correct 3 lines together.

Since this is a log file, and log files are commonly rotated and/or truncated, you cannot be sure that the first line in your log file is the first line in a 3-line group. It is safer to not make that assumption.

Replies are listed 'Best First'.
Re^2: Question about reading a file...
by raisputin (Scribe) on Nov 05, 2009 at 00:11 UTC
    Well, there is more work to do here, as I have run into the problem where I am not alwyas grabbing the correct 3 lines. I will post a solution once I get it complete...I have a few ideas, I will just have to delve into my perl books to see how to implement that bit I think...hmmmmmmm