I'm trying to get it to print in order according to the value of sorter_total as follows:$hash{me}{sorter_total}=10; $hash{john}{sorter_total}=30; $hash{landon}{sorter_total}=20; $hash{jimmy}{sorter_total}=40; foreach my $user ($hash) { @sorted = (sort {$b <=> $a} keys %{$hash{$user}{sorter_total}}); } foreach (@sorted) { print "$_\n"; }
In reply to Sorting Problem by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |