Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: Re: delete a line by a string

by pfaut (Priest)
on Apr 02, 2003 at 14:49 UTC ( [id://247501]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: delete a line by a string
in thread delete a line by a string

Save the code below to x.pl. Invoke with 'perl x.pl <filename>...'.

#!/usr/bin/perl -i -n print unless /\bsome string\b/;
90% of every Perl application is already written.
dragonchild

Log In?
Username:
Password:

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

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

    No recent polls found