in reply to Find duplicate elements from an array
You have to show effort. Here is some tips:
Hash is perfect in this case. Use the "entry" as the key, and put the page numbers in an array. So we are talking about a hash of arrays here.
Traverse through the file line by line, and use a simple regex to separate 'entry" from the page number.
|
|---|