in reply to How to extract keyvalue pairs with duplicate values
The second is just a bit more work:my @keys = grep { $hash{$_} eq 'value' }keys %hash;
my %value; push @{ $value{ $hash{$_} } }, $_ for keys %hash; for ( keys %value ) { if ( @{ $value{$_} } > 1 ) { print "$_ :\n"; print "\t$_\n" for @{ $value{$_} }; } }
Cheers - L~R
|
|---|