http://www.perlmonks.org?node_id=11120442


in reply to Re^2: Shouldn't references be readonly? (updated)
in thread Shouldn't LITERAL references be readonly? (updated)

The whole discussion about "literals" is unfortunately only distracting

uh, I didn't bring up literals at all. It's an ambiguous word which may or may not include [4,5,6] depending on who you ask. It's useless to talk about literals.

You asked why it wasn't like "TEST", 42 and undef, and I told you why.

If you want to ask a different question now, fine.


map { ++$_ } [1,2,3] should throw an error

After all the fuss you made about inconsistency when you thought it wasn't consistent, you now want to make it inconsistent?

No, assigning a number to a scalar that previously contained a reference is odd, but it shouldn't be an error.