KW.pm The Schwartzian Transform #15

       @split = map { [ split ] } @names;
       @sort = sort { $a->[1] cmp $b->[1]
                       || $a->[0] cmp $b->[0] } @split;
       @names = map { join ' ', @$_ } @sort;

 

<< Previous | Index | Next >> Copyright © 2003 Daniel Allen