in reply to Search and delete lines based on string matching

It's really difficult to help you as your code is pretty much unreadable. You should edit your node to be <code> tags around your source code.

It's also a bad idea to say "But its giving me error" without telling us what the error says.

I assume that the words you are trying to filter end up in @lines (not the best name for that variable!), but it looks to me as tho' all of the elements in that array will still have newline characters on the end - which makes it harder for them to match other text.

But, like I say, it's hard to be sure what the problem is until you tidy up the node and give us some better information.

  • Comment on Re: Search and delete lines based on string matching