Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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 Ganesh Bharadwaj1 (Sexton)
on Jan 20, 2016 at 03:42 UTC ( [id://1153137]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    use strict;
    ...
    
    close($in);
    close($out);
    
  2. or download this
    PPPPP
    XXXXX is my name
    ...
    XXXXX is what I play
    KKKKK
    NNNNN
    
  3. or download this
    KKKKK
    UUUUU
    BBBBB
    NNNNN
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1153137]
Approved by GrandFather
Front-paged by kcott
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-04-26 09:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found