Each record should be split into the label and the rest
Make the label the hash key and the rest the hash value
Close file1 and open file2 and read it in one record at a time
Each record should be split into the label and the rest
You now have two rows to compare (the current record from file2 and the one stored in the hash keyed on the label from file1), so do that for whatever "compare" means in your task
Snippets of code should be wrapped in
<code> tags not<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).