my @sorted = sort { substr($a, 1, 1) cmp substr($b, 1, 2) } @names;
The others aren't much more complicated, you just have to enhance the comparison in the curly braces. Or, even better, do a Schwartzian Transform.
In reply to Re: sorta sorting fun
by moritz
in thread sorta sorting fun
by softworkz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |