After you read the first file into a hash, you read each line of the second file, but instead of storing this, you check if each name exists in the hash; if so, print "OK" or "WRONG" according to whether the values match and then delete that hash element. When done reading the second file, any remaining hash elements are names in file1 that were not in file2 -- so that is where you iterate through the hash, to print those out at the end.
In reply to Re: iterating through a hash?
by graff
in thread iterating through a hash?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |