in reply to Re: how many elements in array?

in thread how many elements in array?

tcf03,

$#one and scalar @one do not produce the same thing. Using scalar @one gives the number of elements, which is what was asked for, while $#one gives is the index of the last element.

$#one and scalar @one do not produce the same thing. Using scalar @one gives the number of elements, which is what was asked for, while $#one gives is the index of the last element.

Cheers - L~R

In Section
Seekers of Perl Wisdom