This is an efficient way of sifting elements out of one array and into another. You'll notice the order isn't the same. That can be changed.
sub sift (\@@) { my $in = shift; my @s; for my $r (@_) { my ($i,$j) = (0,0); push @s, grep +( $j++, /$r/ and (splice(@$in,$j-1-$i,1),++$i) ), @$in; } return @s; } @orig = qw( where are going to you ); @sifted = sift @orig, qr/^[aeiouy]/, qr/ng$/; print "@sifted;@orig\n"; # are you going;where to