No, I don't think so. If @foo is empty, then scalar(@foo) is zero, not undef, and the equality holds true... (actually undef == 0 is also true, though it emits a warning)
The only time @foo != $#foo + 1 is when you messed with $[ (but you didn't do that, did you?)
--In reply to Re: Re: Re: Answer: How do I find the index of the last element in an array?
by edan
in thread How do I find the index of the last element in an array?
by vroom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |