my %unique; while ( my $line = <DATA> ) { chomp $line; my ( $left, $right ) = split /\s+/, $line; push @{$unique{$left}}, $right; } foreach my $key ( sort keys %unique ) { print "$_\t"; foreach my $item ( @{$unique{$key}} ) { print "$item "; } print "\n"; }
Dave
In reply to Re: Removing duplicates
by davido
in thread Removing duplicates
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |