I have some files that contain similar data.
Something along the lines of:

File1.txt

Name,SSN,File
"Doe John",123456789,3447

File2.txt

Name,Salary,ZIP
"Doe, John",50000,10003

I would like to merge (join?) this data together. I have 7 or 8 files like this. The only constant (unfourtunately) is the Name. Of course as people get married and learn how to spell the Name occasionally changes.

My goal is to write something that will merge the file and create two files: Matches and Exceptions. I have read some things (5.10, 14.4, 14.8) in the Perl Cookbook but I am having a hard time wrapping my head around some of this stuff.

any ideas?
--
lmoran@wtsgSPAM.com
print "\x{263a}"

In reply to Merging files by ellem

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.