RosettaCodeData/Task/Sort-an-integer-array/Perl/sort-an-integer-array.pl

3 lines
55 B
Raku

@nums = (2,4,3,1,2);
@sorted = sort {$a <=> $b} @nums;