in reply to Distant Global Regex Challenge
What if you spin through the file once up front, making a hash. Keys are the important data. Values are an array of line numbers where that data was found.
Filter out all the hash entries with a single line number, and you'll be left with the duplicates. Take all those line numbers, and sort.
Second pass through, you can use the list of line numbers to drop the duplicates.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Distant Global Regex Challenge
by muppetjones (Novice) on Mar 13, 2012 at 21:38 UTC |