I have a 3 deminsional hash that I would like to sort on the value in
descending order. I can't quite seem to figure it out

The portion of the program I can't get figured out:
## body
foreach my $frameNo ( keys %RNC ) {
  foreach my $ec ( keys %{$RNC{$frameNo}} ) {
    my $ec_count = $RNC{$frameNo}{$ec};
      printf $out("%-4s %-25s %-10s\n",$frameNo,$ec,$ec_count);
  }
}


This is what the hash looks like:

$VAR1 = {
          '22' => {
                    '44021' => '1',
                    '80002' => '25',
                    '51002' => '213',
                    '51009' => '194',
                    '26005' => '5',
                    '44003' => '194',
                    '80000' => '50',
                    '10011' => '156'
                  },
          '23' => {
                    '80002' => '11',
                    '10013' => '10',
                    '10014' => '47',
                    '27006' => '3',
                    '42065' => '23',
                    '90001' => '17',
                    '22008' => '59',
                    '44003' => '209',
                    '80000' => '54',
                    '10011' => '155'
                  },
          '24' => {
                    '10012' => '47',
                    '10013' => '2',
                    '27001' => '3',
                    '44003' => '335',
                    '10011' => '914',
                    '80000' => '21'
                  }
        };

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to