Try using the readmore tag to keep your post more concise.

Can you be more specific as to what you're having trouble with? You know how to find duplicates between files. You found the files of interest. I don't understand "matching afterwards".

Repeating the code three times for each pair of files is bad to begin with, and clearly will not scale to larger groups of files! Use a loop. You don't need separate hashes for everything, and I don't see the point of temp files.

Here's how I would do it: For each file, read each line and hash it. Store the hash (not the whole line) as the key to a master hash, with the value being a list of file names it was seen in. So, for each line, push the current file name onto the value of that line's key.

After going through all the files, iterate through each hash entry and note which ones have more than one item in the value.


In reply to Re: Sting matching by John M. Dlugosz
in thread String matching by jwesley

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.