Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict ;
    
    ...
    my $sort = 1 ;
    my $sortby = "number" ;
    print join ("\n", sort {&sort_func} @array) ;
    
  2. or download this
    my $col = 1 ; # this is called "$sort" and "$item_no" in the original
    my @sorted = sort {(split ("\t", $b)) [$col] <=> (split ("\t", $a)) [$
    +col]} @array ;