⭐ in reply to How do I sort a list of numbers?
If you did@sorted=sort{$a <=> $b} @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.@sorted=sort @unsorted;
|
---|