I need to access elements 8959, 10710, 10710 to find their distinct count.
To help you, it would be helpful if you posted the code which populates the array @result. This array holds array references, whose first element is the thing you are looking looking for to get the distinct count, right? Well, use them as key to a hash and sum them up:
my %distinct; for my $aref ( @result ) { $distinct{$aref->[0]}++; } print Dumper(\%distinct);
In reply to Re: Trying to access array of arrays
by shmem
in thread Trying to access array of arrays
by kris1511
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |