in reply to Fishin thread How do I remove lines from a file...
Correct, but given the example data file it works. :)
If the file doesn't start with MYTAG1, then you'd of course need to prefix with
while( <> ) { last if /^MYTAG1/; print } [download]
Or use something like Re: How do I remove lines from a file....