G'day g_speran,
The values of both answer keys ($query->{answer} & $reply->{answer}) are arrayrefs. Counting the number of elements in an arrayref is very simple:
$ perl -E 'my $answer = [qw{x y z}]; say 0+@$answer;' 3
You might benefit from reading "perldsc - Perl Data Structures Cookbook".
— Ken
In reply to Re: Net::DNS answer count
by kcott
in thread Net::DNS answer count
by g_speran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |