> while getNextValue() -> $i { > ... > } > > while getOtherNextValue() -> $i { > ... > } > > which generates no warning because each C<$i> is a parameter of the > corresponding loop block, and hence scoped to that block.
Ok, now I understand the plan. In brief, in the following example $result is scoped to the block that encloses the whole loop: while (my $res = $search->getnext) { ...} However, in the next example, $res is scoped to the loop: while $search->getnext() -> $res { ...} Right? OK, that sounds cool. We still have loop-scoped variables. I'd like to suggest, though, that the first example would refuse to compile. If the plan is to significantly change the behavior of something as popular as that construct (and I did some research, it's VERY popular, details available on request), it would make more sense to refuse to compile than to DWIDM (Do What I Don't Mean). -Miko