Help for this page

Select Code to Download


  1. or download this
    my @newarray;
    foreach my $i (@arrayindex) {
       push @newarray,$array[$i];
    }
    
  2. or download this
    my @kept = grep { $_ < 4 and $_ > 10 } @array;
    
  3. or download this
    @array = grep { $_ < 4 and $_ > 10 } @array;