in reply to problems sorting hashes of hashes
This will sort by count in reverse numerical order, from biggest count to smallest. If you want it the other way round, swap the $a and $b.for my $auth (sort { $hash{$b}{count} <=> $hash{$a}{count} } keys +%hash) { print FILE "$hash{$auth}{fname} $hash{$auth}{lname}: $hash{$au +th}{count}\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: problems sorting hashes of hashes
by daemonchild (Acolyte) on Jul 02, 2000 at 01:18 UTC |