Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Search and replace in all odd lines

by jesuashok (Curate)
on Jun 25, 2007 at 10:52 UTC ( [id://623140]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -i.bak -nle 's/search/replace/g unless $. & 2; print' file(s)
    
  2. or download this
    perl -i.bak -nle 's/search/replace/g unless $. & 1; print' file(s)
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2024-03-28 22:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found