In a sense, you can follow each line and code it, with some changes:

open all files - open one file, then the other.
concatenate $number.$year into one $searchvalue following your example, you should concatenate a space between the two values.
populate array1 with these $searchvalues - that's already done, keys %hash is your array.
grab all lines from file 2 into array2 - also redundant. if you iterate over each line, and compare it, you don't need to load all lines into an array.

compare array1 to array2, where value from array1 doesn't find a match in file2, print hash value with the key of $searchvalue to file results

This, I think, is the main loop, if you're comparing values from file1 to file2, I think you should first go over file2, populate its content into an array, then go over file1, and  print $_."\n" unless grep ($_ eq $number.' '.$year, @array);

Software speaks in tongues of man; I debug, therefore I code.


In reply to Re: pseudocode needed - comparing multiple columns of two files by Erez
in thread pseudocode needed - comparing multiple columns of two files by Anonymous Monk

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.