Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^3: Where is $# fully documented?by ysth (Canon) |
on Sep 23, 2014 at 17:25 UTC ( [id://1101688]=note: print w/replies, xml ) | Need Help?? |
Special function? No. The a in @a is the identifier part of the variable name; the documentation addresses anywhere you'd put that a, which includes $#a. Update: hmm, it does say "as part of a variable...name", implying it would only work if $#a is a considered a variable. 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. In any case, $#$arrayref / $#{$arrayref} ought to be added to the examples there.
-- A math joke: r = | |csc(θ)|+|sec(θ)| |-| |csc(θ)|-|sec(θ)| |
In Section
Seekers of Perl Wisdom
|
|