Your requirements aren't clear to me. How do you want to compare the columns? Do all three have to match, and do they have to match respectively, or can they match in any order? (In other words, can "a, b, c" match "b, c, a"?) Or is it okay if only one matches? Can any line from one file match any line in the other file (I think this is your intention)? If so, what should it do when it finds a match? What if a line in one file matches multiple lines in the other file? Is that possible, and if so, what should be done?
Work out what your requirements actually are and explain them as clearly as you can, preferably with some sample input and output data, and it will be easier for people to help you.
Aaron B.
Available for small or large Perl jobs and *nix system administration; see my home node.