|
|
| Pathologically Eclectic Rubbish Lister | |
| PerlMonks |
Re: Alias of hash-values?by moritz (Cardinal) |
| on Feb 20, 2013 at 16:22 UTC ( #1019805=note: print w/ replies, xml ) | Need Help?? |
|
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:
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||