%args> $reportlist %args> % my $count_all = 0; % my $count_pass = 0; % my $count_fail = 0; % my $count_unknown = 0; % $count_all += @{$reportlist->{reports}}; % my $reports = $reportlist->{reports}; % foreach my $report (@$reports) { % if ($report->{successgrade} eq 'PASS') { $count_pass++ } % elsif ($report->{successgrade} eq 'FAIL') { $count_fail++ } % else { $count_unknown++ } % }