If I'm not mistaken, I believe that there's another issue you're trying to pull it here, namely difference between for(1) and for(1..3). They _do_ behave weirdly, I totally agree. But I believe that's a totally separate issue, probably related to parser even, because this code:
my $a = 2; $_++ for 1..$a; print "$a\n"; # 2
shows that $a is not aliased. Therefore I don't see how the original problem that needs a scalar be both aliased and read-only, is relevant here.
|Replies are listed 'Best First'.|
Re^13: ref to read-only alias ... why? (notabug)
by ikegami (Patriarch) on Jan 06, 2012 at 22:16 UTC