http://qs1969.pair.com?node_id=946617


in reply to Re: ref to read-only alias ... why? (notabug)
in thread ref to read-only alias ... why?

I want it documented, and consistent. I agree that the for() case can be seen as stretched ( I like my for(1) to make an alias to $_ so I can do all magic with it inside the for block, but that's another story).

But anyway, what would you say about this then? Is this a bug or not?

sub x { my $ref = \ $_[0]; $$ref ++; } x(1);
I'd say that even if this behavior will be decided on as not a bug, then it has to be documented, at the very least.