in reply to Lost with a multi-level hash sort

You sorted by VALUES, instead of KEYS, then VALUES. Try:
foreach my $item (sort { scalar keys (%{$reg{$b}})<=>scalar keys (%{$r +eg{$a}}) || $b<=>$a } keys %reg){ + foreach my $case (sort {$a<=>$b || $reg{$item}{$a} <=> $reg{$item} +{$b}} keys %{$reg{$item}}){ print "$c = $item:$case\n"; $c++; } } __OUTPUT__ 1 = 282:37 2 = 282:38 3 = 282:39 4 = 212:41 5 = 212:42 6 = 212:49

             I hope life isn't a big joke, because I don't get it.
                   -SNL

Replies are listed 'Best First'.
Re^2: Lost with a multi-level hash sort
by glenn_t (Initiate) on May 25, 2012 at 22:41 UTC
    That works great! Thanks! Glenn