What algorithms have you tried?
As I understand it, all you want to do is:
- If the line is NOT event #{counter} set counter to undef/zero
- If the line is event #1, set counter to 1
- If the line is event #{counter}, increment counter
- If the counter is now greater than {num events: IE 4}, save the last four lines off to somewhere and reset the counter to undef/zero
- SJ
The monks can fry your fish, and they can give you some tips and some bait, but you still need to wake up in the morning and climb onto the boat.