in reply to print lines which are not reverse duplicates
unless ($seen{$comment_author2}){ $seen{$comment_author1} = $comment_author2; } else { delete $seen{$comment_author2}; }
at the end the hash should only contain unique pairs.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
You can put any data into the hash, something like =[$comment_author1,$interactions] would keep more informations if needed.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: print lines which are not reverse duplicates
by Maire (Scribe) on Nov 26, 2018 at 08:03 UTC |