On Wed, Aug 30, 2006 at 01:37:33PM +0800, Agent Zhang wrote:
: Hi, there~
: 
: I think S04 says too little about statement modifiers. Please comment
: on the following code samples. Are they valid Perl 6?
: 
:    do { say } for 1..3;

The do-BLOCK construct does not allow statement modifiers.

:    { say } for 1..3;
: 
:    -> $i { say $i } for 1..3;

These are both legal syntactically, but neither of these do anything
other than produce a closure muliple times without calling it.

: And how about similar variations for other statement modifiers, such
: as  while, given, if, until, and unless?

Same.  Will clarify S04.

Larry

Reply via email to