@sorted = sort { $a->{VAL} <=> $b->{VAL} } keys %bigHash; return \@sorted; #### return [ sort { $a->{VAL} <=> $b->{VAL} } keys %bigHash ];