Lance wrote:
> 
> Are you looking for how many elements the array has?  If so:
> 
> $lastElement = $#array;

That does NOT give you the number of elements in an array.  That gives
you the index of the last element in the array.

$ perl -le'
@array = qw/ a b c d e f /;
print q(The number of elements in @array is ), scalar @array;
print q(The last element in @array is at ), $#array;
'
The number of elements in @array is 6
The last element in @array is at 5



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to