Help for this page

Select Code to Download


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