Pre-build the split array
@split = map { [ split ] } @names;
2) Do the comparison
@sort = sort { $a->[1] cmp $b->[1] || $a->[0] cmp $b->[0] } @split;
$a and $b contain elements of @split, which were references to arrays.
continued...