in reply to Extract common lines from 2 files

I can do this in Unix using grep -Fx. But it fails in windows as hamilton grep does not have this option.

Ditch "hamilton grep" asap, use GNU grep.

http://gnuwin32.sourceforge.net/packages/grep.htm

http://sourceforge.net/projects/unxutils/files/

Replies are listed 'Best First'.
Re^2: Extract common lines from 2 files
by Anonymous Monk on May 10, 2012 at 20:23 UTC

      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.