Horje

NUMERIC sort - Sorting - Perl
Learn
Perl - Sorting - Numeric sort
Numeric Sort
@sorted = sort { $a <=> $b } @list;

Comparing $a and $b with the <=> operator ensures they are compared numerically and not textually as per default.

Read Article
https://develop.horje.com/learn/1434/reference