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