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


in reply to Re^4: partial match between 2 files
in thread partial match between 2 files

The script assumes the same number of words in each file, since you showed the same number words in the two different word sets. Your next step is to make a few changes to adapt this script to handle files with different numbers of words.