Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


in reply to 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.

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?

  • Comment on 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)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1153138]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (1)
As of 2024-04-25 00:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found