Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: how to comment the lines if found a match

by lostjimmy (Chaplain)
on Dec 05, 2008 at 18:55 UTC ( #728347=note: print w/replies, xml ) Need Help??


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

Since you haven't provided any code, how about some pseudocode to get you started?
OPEN file1 READ contents of file1 into array @words OPEN file2 FOR line in file 2 IF line contains any of @words PRINT "#" + line ELSE PRINT line
You might want to check out the documentation for open and perlretut.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2023-12-10 09:54 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?