Last updated 1 year ago
Was this helpful?
Primary sort by length of string, then break ties by sorting alphabetically (ignoring case).
my @strings = <Here are some sample strings to be sorted>; put @strings.sort:{.chars, .lc}; put sort -> $x { $x.chars, $x.lc }, @strings;
be to are Here some sample sorted strings be to are Here some sample sorted strings