![]() |
|
Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^8: Shouldn't references be readonly?by Fletch (Bishop) |
on Aug 05, 2020 at 21:16 UTC ( #11120363=note: print w/replies, xml ) | Need Help?? |
The undef $_++ vs $$_++ I think the former is working because what's happening is:
In the second case you're explicitly dereferencing the SVrv to the constant undef and trying to increment that (which fails because undef is a singleton readonly SV*). Edit: And again yes making explanation by way of the implementation, but I think that's because knowing (sort of) how this is implemented under the covers makes these particular corner cases' behaviors not (as) surprising.
The cake is a lie.
In Section
Seekers of Perl Wisdom
|
|