|Keep It Simple, Stupid|
Marcus, you are incorrect when you summarize the documentation as noting that modifying a reference taken to a substring is forbidden. That's wrong.
You're right. I expressed myself so badly that what I wrote was factually wrong. I'll update my original response. Thanks for pointing out my mistake.
Incidentally, though, as long as no substr is involved, you can run as many substitutions as you wish on an indirected reference. Hence:
That $_ = \$_ construction is interesting. It yields a variable for which $_ == $$_ == $$$_, etc. No matter how many times you indirect it, the type and value of $_ don't change. There must be some code that breaks when you do that!
In reply to Re^3: Scalar refs, aliasing, and recursion weirdness.