in reply to Re^4: correspondence between two arrays
in thread correspondence between two arrays

When you say you need to "check whether a value exists in something," that almost always means you should put something in a hash, and then check your values against that hash. Since you want to check whether values from file1 exist in file2, you put file2 in a hash (with the part you're checking against as the keys), and then start looping through file1 and checking its values to see if they exist as keys in the hash.

Aaron B.
My Woefully Neglected Blog, where I occasionally mention Perl.

  • Comment on Re^5: correspondence between two arrays