Exactly the same aliasing occurs for both for(1..3) and for(1).
I'm sorry, but you're dead wrong here:
my $a = 2;
$_++ for 1..$a;
print "$a\n";
# 2
my $a = 2;
$_++ for $a;
print "$a\n";
# 3
clearly, there are two different mechanisms: the first does not do aliasing, whereas the second does.
But anyway, I still don't understand the "working case" you referred to that my patch will break. Could you please produce that?
Intentionally coded to return a value that can be changed without causing a read-only error.
Is there any proof of that intention? Best in perldoc? |