Help for this page

Select Code to Download


  1. or download this
    ($sub1, $sub2, $sub3) = split (/\_/, @array,3);
    
  2. or download this
    while my $elem (@array)
    {
      ($sub1,$sub2,$sub3) = split(/_/, $elem, 3);
      # do something here...
    }
    
  3. or download this
    $sub3 = sort { $b <=> $a } $sub3;
    
  4. or download this
    my @a2;
    while my $elem (@array)
    ...
      push @a2, \@fields;
    }
    my @a3 = sort { $b->[2] <=> $a->[2]} @a2;