can't 'fix' the buffer problem, it is something I can't touch. This works very well. Thanks. Now I need to figure out how it works so I may absorb the wisdom.
Here are some notes to help you understand get_line:
!defined($buf) is only true the first time get_line is called. It proceeds to trash all the lines before the first timestamped line, if any.
The file is processed as follows:
File Read by Returned by
----------------- ----------- -----------
line 1st call(*) scrapped
line 1st call(*) scrapped
timestamped line 1st call(*) 1st call
line 1st call 1st call
line 1st call 1st call
timestamped line 1st call 2nd call
line 2nd call 2nd call
line 2nd call 2nd call
timestamped line 2nd call 3rd call
line 3rd call 3rd call
line 3rd call 3rd call
timestamped line 3rd call 4th call
EOF 4th call 5th call