Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: what would you like to see in perl5.12? (nested statement modifiers)

by TimToady (Parson)
on Aug 21, 2007 at 17:20 UTC ( #634140=note: print w/ replies, xml ) Need Help??


in reply to Re: what would you like to see in perl5.12? (nested statement modifiers)
in thread what would you like to see in perl5.12?

Nevertheless, Rule 2 applies here: several months ago we decided it was okay for Perl 6 to allow a conditional modifier inside a loop modifier because it makes it easier to write list comprehensions close to the way mathematicians like to write them:

%desc{$_} if .path for <n ne e se s sw w nw up down>
Also, any parenthesized or bracketed expression is now parsed as a statement, so you can nest modifiers to your heart's content as long as you parenthesize. In particular, this allows you to use a list comprehension for a slice subscript.

Update: changed @desc to %desc as noted by wolverian++


Comment on Re^2: what would you like to see in perl5.12? (nested statement modifiers)
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://634140]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2015-07-30 05:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls