in reply to How can I sort my array numerically on part of the string?

The "how" has been sorted by others, but no explicit mention of "why". Perl's sort comes in a number of different forms. The short form of sort is essentially the same as sort {$a cpm $b} .... cmp (see perlop for cmp and <=>) compares strings so things that look like numbers are sorted like strings. To sort numerically you need the numeric comparison operator <=>. Sort then looks like sort {$a <=> $b} ....

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond