for my $key (sort { $ref->{$b}->[CONSTANT] <=> $ref->{$a}->[CONSTANT] } keys %$ref)