in reply to RE: RE (tilly) 1: remove duplicate lines from input file
in thread remove duplicate lines from input file

If you follow the thread I linked you would find discussion of essentially that alternative. Using ++$seen{$_} was noticably faster because you avoid unnecessary scalar creation.
  • Comment on RE (tilly) 3: remove duplicate lines from input file