in reply to Strange aliasing(?) when modifying variable in range operator

> Edit 2. But what about the do

(see also Re^3: Strange aliasing(?) when modifying variable in range operator)

I think it's the right side of for which is a statement in it self and does optimization (foreach has lot's of magic, it's also aliasing)

D:\Users\lanx>perl -wE "$i=0; say for do{$i},$i++" 1 0

BUT ... (wow oO ???)

DB<3> $i=0; say for do{$i},$i++ 0 0

apparently different levels of optimizations are exposed here when the debugger does an eval on the entered line.

DB<4> say $] 5.016003

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery