in reply to Re: Hash value sorting
in thread Hash value sorting
Awesome, sorted with one minor adjustment to your code; I had to dereference the conditions of the sort because it was sorting by the scalar reference address. I changed it to:
foreach my $key ( sort { ${$self->{_counts}{$a}} <=> ${$self->{_counts}{$b}} } keys %{ $self->{_counts} }
Thanks so much for the help.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Hash value sorting
by greengaroo (Hermit) on Aug 14, 2012 at 12:57 UTC | |
by daxim (Curate) on Aug 14, 2012 at 13:34 UTC | |
|
Re^3: Hash value sorting
by daxim (Curate) on Aug 14, 2012 at 13:44 UTC | |
by iHutch105 (Initiate) on Aug 14, 2012 at 15:41 UTC |