in reply to Filtering array based off of two values against second array

If I understand correctly, you want to keep in Array 1 lines whose identifiers are also in Array 2.

If so, then start by reading Array 2 and store the (common) identifiers into a hash (as hash keys, values can be anything). Once this is done, read Array 1 and print out the lines whose identifier can be found in the hash previously populated.

I won't suggest any code, though, because I can't make sense from the input data samples you've provided.

  • Comment on Re: Filtering array based off of two values against second array