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