Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
my main point is that things like this
map { ++$_ } [1,2,3] should throw an error, because the mutation of a reference itself doesn't make any sense. And I was asking if there is a reason why they don't. The whole discussion about "literals" is unfortunately only distracting, (though Wikipedia is on my side: Literal (computer programming): "a notation for representing a fixed value in source code" but I don't wanna continue this. NB: fixed doesn't mean (compile-time) constant. It means not variable) Cheers Rolf In reply to Re^2: Shouldn't references be readonly? (updated)
by LanX
|
|