more useful options | |
PerlMonks |
Re: 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. (step by step)by Anonymous Monk |
on Jan 20, 2016 at 03:57 UTC ( [id://1153138]=note: print w/replies, xml ) | Need Help?? |
this is how you figure it out so you read first line, it doesn't match so you read second line, it doesn't match so you read third line, it matches so you read fourth line, it doesn't match so you read fifth line, it doesn't match
so when should you print lines you want to print? how many lines do you have to remember?
In Section
Seekers of Perl Wisdom
|
|