in reply to Re^4: matching an array
in thread matching an array

Make a hash whose keys are the values found in file1. As you read in each line from file2, see if the relevant value is found in the hash from file1. If it is, print it out.

If you're having problems, show me the code where you attempted to create the solution as specified. Otherwise, I'm not going to be able to help you very much. (And, frankly, I'm not going to want to even try. You've got to do most of the work - I'm just here to help you over the rougher patches.)

------
We are the carpenters and bricklayers of the Information Age.

Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

I shouldn't have to say this, but any code, unless otherwise stated, is untested