in reply to Re^11: ref to read-only alias ... why? (notabug)
in thread ref to read-only alias ... why?
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.
In Section
Seekers of Perl Wisdom