--- Pankaj Warade <[EMAIL PROTECTED]> wrote:
> my @array = ( 1, 2, 3, 4 );
>  
> print $#array; ---> size of array.

No, that is wrong.  $#array gives the index of the last
element, which is one less than the number of elements.

Use this instead:

print scalar @array;

Jonathan Paton

 

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

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

Reply via email to