sub my_filter { my ($hash) = @_; return [ sort {$b <=> $a} keys %{$hash}; #Reverse sort ]; }