my %hash; while ( <IN> ) { $hash{ $_ }++; } foreach my $key ( sort keys %hash ) { if ( $hash{ $key } > 1 ) { print DUP "$key\n" x $hash{ $key }; } else { print UNQ "$key\n"; } }
In reply to Re: Separate duplicate and unique records
by markguy
in thread Separate duplicate and unique records
by wsee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |