Welcome to Perl and the Monastery, Deicide!

Please have a look at How do I post a question effectively? and Short, Self-Contained, Correct Example: at the very least, please provide some sample input that demonstrates what you are describing, the expected output for that input, and if you have it, any code you've tried, plus the output you're getting from that code, including exact error messages. Each of these should be placed in <code> tags for readability.

In general, for handling CSV data, it's best to use a module like Text::CSV (also install Text::CSV_XS for speed). It sounds like you'll want to parse the first file, and as you're doing so, parse the cells in question using a regex - if the string you want to match on is always in parentheses, like in "first last(G123456)", the perhaps you could use Regexp::Common::balanced to help with that (but we'd need to see some more samples of input data to be sure). Then, assuming you want exact matches, perhaps you could build a hash of the values you've seen (with the keys being the values, for easy lookup), and as you're parsing the second file, look up matching strings in the hash. But this is just a rough idea based on the description you've provided so far, as you give more details, better methods might emerge.


In reply to Re: 2 files by haukex
in thread 2 files by Deicide

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.