If you files are sorted one, you can use linux command comm to find the common lines from all the three files,
comm -12 fileA fileB | comm -12 - fileC
-1 : suppress lines unique to FILE1
-2 : suppress lines unique to FILE2
-3 : suppress lines that appear in both files
In reply to Re: Compare 3 files and print matches in Perl
by vinoth.ree
in thread Compare 3 files and print matches in Perl
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |