Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: how internally $#array is working in Perlby sflitman (Hermit) |
on Aug 13, 2010 at 05:44 UTC ( [id://854833]=note: print w/replies, xml ) | Need Help?? |
My understanding is that $#x is the n-1 index for a 0-based array. All Perl arrays are 0-based, until you change $[. Why do you wish to change $[? Also, it may be safer to use scalar(@x) for how many elements there are in x. There are ominous warnings about $# going away at some point in several of the perldocs.
As for the actual internals, you would need to look at the Perl source. (shiver) --> perlguts
HTH,
In Section
Seekers of Perl Wisdom
|
|