Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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

by pfaut (Priest)
on Apr 02, 2003 at 14:49 UTC ( #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
Node Status?
node history
Node Type: note [id://247501]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2021-04-11 18:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?