- or download this
my @sorted_keys = %hash.keys.sort
- or download this
%hash.keys.sort({ %hash{$_} });
- or download this
# return a random, anonymous hash:
sub h {
...
# and get the keys sorted numerically by value:
my @keys = h().sort( { .value })>>.key