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.


In reply to Re: Compare three columns of one file with three columns of another file in perl by aaron_baugher
in thread Compare three columns of one file with three columns of another file in perl by anonym

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.