in reply to Re^2: Extract common lines from 2 files
in thread Extract common lines from 2 files

I had a very similar question the other day. You can find my complete code on the last post of this thread.

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

The cpan utility I used is here. (though there is a way to use grep)

http://search.cpan.org/dist/Array-Utils/Utils.pm

Basically you need to open each file and read them into separate arrays. Then cycle through and find the matches.

  • Comment on Re^3: Extract common lines from 2 files