Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Re: One-liners: Conditionals in Loops

by TheDamian (Priest)
on Nov 05, 2003 at 04:12 UTC ( #304619=note: print w/replies, xml ) Need Help??


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;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://304619]
help
Chatterbox?
[choroba]: Good morning!
[shmem]: GDPR meets butcher's shop
[marto]: if only Spectre had remained a fictional organisation :P https://www. phoronix.com/scan. php?page=news_item &px=Spectre-V3-V4- Vulnerabilities
[marto]: 'GDPR meats butcher's shop'?
[Discipulus]: ;=P

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2018-05-22 07:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?