You haven't shown us what you have tried so far, nor what your criteria for "best" are (fastest, least memory, simplest, etc). We cannot easily help you if you don't do your homework first.
From what you've given us, I'd egrep -v the data from the command line and skip perl altogether ...
In reply to Re: Remove line above matching criteria
by idsfa
in thread Remove line above matching criteria
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |