Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

qw// is special!

by Mr. Muskrat (Canon)
on Apr 09, 2003 at 15:28 UTC ( #249255=note: print w/replies, xml ) Need Help??

in reply to Re: Surpised by foreach iterator limitation
in thread Surpised by foreach iterator limitation


I just read your update and now I can see what you mean. I've been using that syntax for some time and never even noticed the missing parentheses. So I set out to see if there are any other operators that would work in this situation without outer parentheses. So far I haven't found anything besides the qw// operator.

foreach is expecting an operator that returns a natural list, generally the list operator: (list). qw// works because it is an operator that returns a list at compile time!

Am I missing any other operators that behave the same way?

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (1)
As of 2021-07-28 04:21 GMT
Find Nodes?
    Voting Booth?

    No recent polls found