Help for this page

Select Code to Download


  1. or download this
    # this searches on Date1
    my @sorted_list = sort {
       ${split(/_/,$a)}[0] cmp ${split(/_/,$b)}[0] } @list;
           # [0] is Date1, [1] is Date2, [2] is type.asp
    
  2. or download this
    my @sorted_list = 
       map { $_[0] }
       sort { date_compare($a[1],$b[1]) }  
          # [1] is Date1, [2] is Date2, [3] is the type.asp
       map { [ $_, split /_/ ] } @list;