Next The Perl Hardware Store DC.pm Version 41

The Indirect Sort

        0         1        2           3     4           5
        Albert    Mark     Morton      Babe  Nat         Larry
        Einstein  Dominus  Zeemeister  Ruth  Torkington  Wall
        @indices = sort {$last[$a] cmp $last[$b]} (0 .. $#last);
        @sorted = @first[@indices];


Next Copyright © 2003 M. J. Dominus