Help for this page

Select Code to Download


  1. or download this
    my @x = qw( eenie meenie minie moe );
    my @y = cull { /m.*nie/ } @x;
    ...
    __END__
    meenie minie
    eenie moe
    
  2. or download this
    my @x = grep { /m.*nie/ } qw( eenie meenie minie moe );
    my @y = cull { /m.*nie/ } qw( eenie meenie minie moe );
    
  3. or download this
    my @y = cull sub { /m.*nie/ }, @x;
    my @y = cull( sub { /m.*nie/ }, @x );
    
  4. or download this
    for my $i ( reverse 0 .. $#$array ) {
    
  5. or download this
    sub cull (&\@) {
      my ( $test, $array ) = @_;
    ...
      }
      return @culled;
    }