|Problems? Is your data what you think it is?|
How to read the regular expression from another file?by sumathigokul (Acolyte)
|on May 07, 2015 at 09:09 UTC ( #1125976=perlquestion: print w/replies, xml )||Need Help??|
sumathigokul has asked for the wisdom of the Perl Monks concerning the following question:
Before asking my question, i have to say this....Perlmonks is really a great resource for the beginner in perl, i am really thank full to all for your kind replies.
I have a file "file1" with three lines as follows
I have another file "file2" with following lines
i want a perl script that reads file2 and print the lines which has any of the words listed in file1 (i.e. either a_c or b_c or c_c) and save those lines in new file.
My perl code for this is as follows
But, its not copying any of the matched lines in new5.txt file.
Please correct the mistake....Thank you all once again...
Back to Seekers of Perl Wisdom