in reply to divide by '/'
And you want them sorted like this:64/2829 1/349834 37823/8338 5/989328
Here:1/349834 5/989328 64/2829 37823/8338
sub sortbyfirst { my ($f_a, undef) = split(/\//, $a); my ($f_b, undef) = split(/\//, $b); return $f_a <=> $f_b; } @sorted = sort sortbyfirst @numbers;
Note: Untested.
This won't be superfast... If you've got a huge list, or this runs constantly, look into the tye transductor, illustrated here.
stephen
|
|---|