http://qs321.pair.com?node_id=575193


in reply to Re: comparing two files for duplicate entries
in thread comparing two files for duplicate entries

or, just slightly different:
open(FILE1, "file1"); open(FILE2, "file2"); while(<FILE1>){ /(\S*)\s+(\S*)/; $hash{$1}=$2; } while(<FILE2>){ /(\S*)\s+(\S*)/; print "$1 $hash{$1} $2\n" if $hash{$1} }


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"one who asks a question is a fool for five minutes; one who does not ask a question remains a fool forever."

mk at perl dot org dot br