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


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

++demerphq!

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?