http://www.perlmonks.org?node_id=304619


in reply to Re: One-liners: Conditionals in Loops
in thread One-liners: Conditionals in Loops

I believe that Perl 6 will have this feature.
I'm not so sure. Every time the topic has been raised, Larry has remained steadfastly adamant that stackable qualifiers won't be added to Perl 6.

Of course in Perl 5 you can already do this:

# Perl 5 do{print "$_\n" if /pattern/} for @arr;
at the cost of four extra characters. And that would probably be reduced to two extra characters in Perl 6, given the new "every-block-is-a-closure" semantics:
# Perl 6 {print "$_\n" if /pattern/} for @arr;