just a note to add to this method

$#array gives the highest index, so the number of elements would be
$#array+1

Also, $#array is useful when doing for to go thru to complete array
since the first index is 0 and the last is nb of elements - 1

for(0..$#array) {#code here }
# or 
foreach(@array) {#code here }

Etienne

Agustin Rivera wrote:
> 
> print $#array;
> 
> Agustin Rivera
> Webmaster, Pollstar.com
> http://www.pollstar.com
> 
> ----- Original Message -----
> From: "Ryan Guy" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, December 17, 2001 12:24 PM
> Subject: Array Length.
> 
> > I need to know the fastest way to determine a length of an array.  I know
> > there is a built in kind of thing somewhere.  I just cant remember it.
> > Thanks
> >
> >
> > --
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Etienne Marcotte
Specifications Management - Quality Control
Imperial Tobacco Ltd. - Montreal (Qc) Canada
514.932.6161 x.4001

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

Reply via email to