Last updated 1 year ago
Was this helpful?
The built-in (available as sub and method) is stable.
Short demonstration for sorting only on the second item of each array:
use v6; my @cities = ['UK', 'London'], ['US', 'New York'], ['US', 'Birmingham'], ['UK', 'Birmingham'], ; .say for @cities.sort: { .[1] };