in reply to how to use foreach loop to do comparison between two arrays of hashes

It appears to me that all you want to do is determine whether or not corresponding lines of the two input files are identical. The data structure that you have chosen to store the files makes this awkward. Is there a good reason that you must keep the existing data structure? I would recommend that you store the whole line as a single string. You would need an array of such strings for each brand name. I will create sample code if you are interested.

UPDATE: I overlooked the problem which Laurent_R pointed out. You have not specified how to tell if the lines are out of order or what to do about it if they are.

Bill
  • Comment on Re: how to use foreach loop to do comparison between two arrays of hashes