http://www.perlmonks.org?node_id=1015083

phineas629 has asked for the wisdom of the Perl Monks concerning the following question:

I need to copy each row of a document that contains the words "make", "model", "year". I will need each row to be put into a new file.

I need to repeat for 300 files. They are located in the same folder and all copied data will be written to the same file. The documents are long but the words are guaranteed to be in the top 30 rows.

I'm still new to Perl and all the help is much appreciated. I'd rather not have to open every file and copy data manually.

Thanks!