Help for this page

Select Code to Download


  1. or download this
    my @As = grep { /A/ } @bigarray;
    my @Bs = grep { /B/ } @bigarray;
    my @Cs = grep { /C/ } @bigarray;
    
  2. or download this
    my (@As, @Bs, @Cs);
    for my $item (@bigarray) {
        if    ($item =~ /A/) { push @As, $item }
        elsif ($item =~ /B/) { push @Bs, $item }
        elsif ($item =~ /C/) { push @Cs, $item }
    }