Grrrrr the "solution" listed below is wrong. It removes adjacent duplicate lines. This is not what the requestor was asking. See the reponses from the other monks for a useful solution.
If you're on a Unix system you can just `uniq` the file. But if you must do it in Perl . . .
my $lastline; while(<>) { print if $lastline ne $_; $lastline = $_; }
In reply to Re: duplicate lines
by mikeraz
in thread duplicate lines
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |