Help for this page

Select Code to Download


  1. or download this
    perl -w -MData::Dumper -e '
    @old = ( "10.5 AA", "9 AC", "2 BB");  
    @new = sort {($b =~ /(\d+)/)[0] <=> ($a =~ /(\d+)/)[0]} @old; 
    print Dumper \@new;
    
  2. or download this
    use Data::Dumper;
    @old = ( "10.5 AA", "10.6 AA", "9 AC", "2 BB");  
    @new = sort {($b =~ /(\d+)/)[0] <=> ($a =~ /(\d+)/)[0]} @old; 
    print Dumper \@new;
    
  3. or download this
    $VAR1 = [
              '10.5 AA',
    ...
              '9 AC',
              '2 BB'
            ];
    
  4. or download this
    use Data::Dumper;
    
    ...
    }
    "a" == "a"; #meaingless other than to demo the fact that the warnings 
    +is back on
    print Dumper \@new;