in reply to Sorting of numbers using arrays

my @sorted = sort @unsorted;

Consider the sort function.