Problems? Is your data what you think it is? | |
PerlMonks |
Re: How do I find the index of the last element in an array?by ChrisS (Monk) |
on Nov 12, 2003 at 14:31 UTC ( [id://306530]=note: print w/replies, xml ) | Need Help?? |
Be careful... you can change the starting index value to something other than zero. I would not recommend doing so, but if you did, you'd get the wrong value by using scalar.
Let me show you what I mean:
So I would recommend two things:
Trying to debug someone else's code when they've changed $[ can be particularly annoying.
In Section
Seekers of Perl Wisdom
|
|