Ovid wrote:
--- 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
thank you :)
--
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>