or, if you're really adamant about chomp()ing the line first, do:while (<DUPLICATE>) { print DUPremoved if not $lines{$_}++; }
while (<DUPLICATE>) { chomp; print DUPremoved "$_\n" if not $lines{$_}++; }
In reply to Re: duplicate lines
by japhy
in thread duplicate lines
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |