in reply to Efficiently compare sorted array vs another sorted array and pattern match

Perhaps this is an option...
1) Loop all values of array putting them in hash with hash{val} -= 1
2) Loop all values in the file putting them in hash with hash{val} += 1

Then hash values of 0 exist in both, values of +1 exist only in the file and values of -1 exist only in the array.

Regards Paul.
  • Comment on Re: Efficiently compare sorted array vs another sorted array and pattern match