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. If you put the array into a
scalar context, you get the length:
my $length = @array;
> How do I find the length if I have a reference?
my $length = @{$arrayref};
-- Brett
http://www.chapelperilous.net/
------------------------------------------------------------------------
There is no statute of limitations on stupidity.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]