@out = sort { $a <=> $b } @in; # to sort array @in numerically, and put it into @out.