in reply to Re: String sorting in Perl
in thread String sorting in Perl
It appears the OP is interested in getting the values out in descending order (sorted).
for my $line (sort {$count_hash{$b} <=> $count_hash{$a}} keys %count_h +ash) { print "$line $count_hash{$line}\n"; }
Cheers - L~R
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: String sorting in Perl
by Laurent_R (Canon) on Jun 04, 2014 at 17:48 UTC | |
by Limbic~Region (Chancellor) on Jun 04, 2014 at 18:06 UTC |