Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: how to comment the lines if found a match

by moritz (Cardinal)
on Dec 05, 2008 at 18:53 UTC ( #728346=note: print w/replies, xml ) Need Help??


in reply to how to comment the lines if found a match

So what have you tried so far?

My idea: read the first file, build a regex from all lines (by joining the lines with |), then read the second file, and prepend a # to all lines which match the regex.

(It's easier if you first produce the correct output instead of editing the file in-place).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2023-12-10 10:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (39 votes). Check out past polls.

    Notices?