Something like this (assuming 'count' contains a numeric value):
my( @sorted ) = sort { $users{$a}->{count} <=> $users{$b}->{count} } keys %users; print "$_ => $users{$_}->{count}\n" foreach @sorted;
Dave
In reply to Re: Sorting data structure
by davido
in thread Sorting data structure
by mhearse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |