in reply to How to find the repeated text in hash
... my %name_count; for my $name (values %names){ $name_count{$name}++; } for my $name (sort {$name_count{$a}<=>$name_count{$b}} keys %name_coun +t){ print "$name occurs $name_count{$name} times in the \%names hash\n"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: How to find the repeated text in hash
by Anonymous Monk on Feb 09, 2015 at 14:26 UTC | |
Re^2: How to find the repeated text in hash
by BillKSmith (Monsignor) on Feb 10, 2015 at 14:54 UTC | |
by QM (Parson) on Feb 10, 2015 at 14:59 UTC |