Sort an integer array

If @a contains only numbers:

my @sorted = sort @a;

For an in-place sort:

@a .= sort;