Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^2: how to check for a word in a file and if found remove that line, the above line and the below line from the file.by ikegami (Patriarch) |
on Jan 22, 2016 at 16:27 UTC ( [id://1153382]=note: print w/replies, xml ) | Need Help?? |
That fails if there are two lines in a row that matches. That can fail if the last line matches. You can't rely on a file handle return EOF more than once.
In Section
Seekers of Perl Wisdom
|
|