Well, if hash values weren't lvalues, $h{1} = 2 wouldn't work. There's no reason why they shouldn't be lvalues when using the whole hash in list context. And any lvalues can be aliased, otherwise $_++ for ... could never work.
I'm not sure those things are explicitly documented somewhere.
The thing that surprises me though is that trying to increment the hash keys doesn't die like this one:
$ perl -wE 'my $x; $_++ for ($x, 1)' Modification of a read-only value attempted at -e line 1.
In reply to Re: Alias of hash-values?
by moritz
in thread Alias of hash-values?
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |