in reply to How do I sort a list of numbers?

you need to use the numerical comparison operator <=> inside of your sort function
@sorted=sort{$a <=> $b} @unsorted;
If you did
@sorted=sort @unsorted;
the sort function defaults to doing a textual comparison so 375 would be considered less than 4 since its first character 3 is less than 4.