--- Mike Blezien <[EMAIL PROTECTED]> wrote:
> what is the correct proceedure to check the number of elements in a
> hash array, 
> when extracting elements like
> $hash->{$key}->[0],$hash->{$key}->[1],.etc is 
> there way to determine the number of elements [  ] in the
> $hash->{$key} if is 
> not known so each element can be displayed.

Arrays in scalar context return the number of elements in the array. 
Try this:

  my $num_elements = @{ $hash->{$key };

Cheers,
Ovid

-- 
If this message is a response to a question on a mailing list, please send
follow up questions to the list.

Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to