> -----Original Message-----
> From: Brett W. McCoy [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 31, 2001 8:24 AM
> To: Hamish Whittal
> Cc: perl beginners
> Subject: Re: Getting the length of an array that is a reference...
>
>
> On Fri, 31 Aug 2001, Hamish Whittal wrote:
>
> > I want the length of the array. normally just getting the length one
> > would write something along the lines of:
> > $length = @#array; # Unless I am mistaken.
>
> That's the incorrect way to get the length of the array
> anyway -- you are
> only getting the index of the last element.
Actually, @#array is a syntax error. The index of the last element
would be $#array.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]