This is a faq. See perldoc4, near unique. I also find the following entries when googling for perl unique:
... and some more. I wonder whether you've seen these links and what parts of the solutions presented there you had problems with.
In reply to Re^3: Sort/Uniq Help
by Corion
in thread Sort/Uniq Help
by learningperl01
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |