in reply to Deleting duplicate lines from file

I think you're asking for the Unix tool uniq. There's a Pure Perl implementation included in the Perl Power Tools set (AKA "PPT"): uniq

Replies are listed 'Best First'.
Re^2: Deleting duplicate lines from file
by jcc (Sexton) on Feb 16, 2006 at 21:17 UTC
    Probably... but remember that uniq removes consecutive dupes versus all dupes at any point. (not sure which the op was after)
    $ cat afile he she he he $ uniq afile he she he
A reply falls below the community's threshold of quality. You may see it by logging in.