in reply to How to avoid printing duplicates
When you think duplicate, think hash.
untested:
HTH, Ratamy %patterns; if (!($patterns{"$line, $match, $link"})) # if not yet in the has +h { print $line, $match, $link, "\n"; # print it $patterns{"$line, $match, $link"} = 1; # ... and add it to the + hash }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to avoid printing duplicates
by Anonymous Monk on Dec 05, 2010 at 03:07 UTC |