Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    # Usage: csort <separator> (<inputfiles> | < input) > output
    ...
    foreach my $aref ( sort { $a->[1] cmp $b->[1] or $a->[0] cmp $b->[0] }
    + @list ) {
        print join ($sep, @$aref), "\n";
    }