my %seen; while (<>) { my ($key) = /^(\S+)/; push @{ $seen{$key} }, $_; } for my $key (keys(%seen)) { my $vals = $seen{$key}; print @$vals if @$vals > 1; }
In reply to Re: find duplicates and write to file
by ikegami
in thread find duplicates and write to file
by suhailck
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |