At least, look at the manual page, and deduce how comm is implemented. It works on sorted files. Big hint! So, using this big blinking hint, how would I implement this?
  1. Sort both files.
  2. Open both files.
  3. If one of the files is empty, the lines in the other file are unique to said file. Then you're done.
  4. Read a line from both files.
  5. If lines are equal, they appear in both files. Goto 4.
  6. If the line from the first file is less then (string wise) the line from the second, it's unique to the first file. If the first file doesn't have more lines, the rest of the lines in the second file are unique to it. Then you're done. Else, read a line from the first file and goto 5.
  7. The line from the second file is unique to it. If you have exhausted the second file, the rest of the first file are lines unique to it, and you're done. Else read the line from the second file and goto 5.
Translating that to Perl is left as an exercise to the user who gets paid for it.

In reply to Re^5: use to files - grep one to eliminate entries from another file. by JavaFan
in thread use to files - grep one to eliminate entries from another file. by newkendall

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.