Help for this page

Select Code to Download


  1. or download this
    my @data = (
       [ 12, 'First line of text'  ],
    ...
          $_[0] += $y while $_[1] =~ /$re/g;
       }
    }
    
  2. or download this
    my @data = (
       [ 1, 12, 'First line of text'  ],
    ...
    
    print("Line ${$_}[0] has a score of ${$_}[1]\n")
       foreach sort { $b->[1] <=> $a->[1] } @data;
    
  3. or download this
    my @data = (
       [ 12, 'First line of text'  ],
    ...
    
    print("${$_}[0]: ${$_}[1]\n")
       foreach sort { $b->[0] <=> $a->[0] } @data;