in reply to print log file
Perhaps you could use Tie::File so that you can access the log file as if it was an array. You could then quickly find the index in the array where the timestamp passes the threshhold by using a binary chop. Look half-way along the array, check the timestamp. If it is less than the threshhold, look again half-way along the upper half, else half-way along the lower half. Repeat, each time chopping the number of elements to be searched in half. Once you have found the element you can print from there to the end of the array.
Just a thought.
Cheers,
JohnGG
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: print log file
by MidLifeXis (Monsignor) on Nov 30, 2006 at 18:18 UTC | |
by johngg (Canon) on Nov 30, 2006 at 23:05 UTC |
In Section
Seekers of Perl Wisdom