Just another Perl shrine | |
PerlMonks |
Re^4: Where is $# fully documented?by LanX (Saint) |
on Sep 24, 2014 at 09:43 UTC ( [id://1101767]=note: print w/replies, xml ) | Need Help?? |
> I shy away from that because, even though it is an assignable lvalue, it really is just an attribute of an array variable. So the doc could use a minor tweak. That's my point, I couldn't mentally map this behavior to normal dereferencing mechanics cause it rather feels like a magic feature. To make it more obvious, theoretically we could have a special syntax for keys and values of a hash ( like e.g. %<hash ). This would be a similar beast (/me struggling for a name ;) > In any case, $#$arrayref / $#{$arrayref}ought to be added to the examples there Definitely! Cheers Rolf (addicted to the Perl Programming Language and ☆☆☆☆ :)
In Section
Seekers of Perl Wisdom
|
|