A related problem I once had fun with. Process a file and only print lines once (unlike uniq no assumption of sorted input). That isn't quite what you wanted, but here was the fastest version I could come up with in Perl:
(Yes, details like where to place the plusses mattered.)perl -ne 'print if 1 == ++$s{$_}' < in > out
In reply to Re (tilly) 1: == uniq
by tilly
in thread == uniq
by northface
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |