in reply to sorta sorting fun

Sorting by second letter of first name:
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.