note
kwaping
Here's my answer, building on the code you have already posted to create <c>%clone_hash</c>.
<c>
# build the data
my %count;
while (my ($test,$result) = each %clone_hash) {
$count{$test}{passed}++ unless ($result =~ /pass4|fail/);
}
# check the data
foreach my $test (keys %count) {
if (! $count{$test}{passed}) {
print "test $test had no passing results" . $/;
} elsif ($count{$test}{passed} == 1) {
print "test $test had only one passing result" . $/;
}
}
</c>
I am ignoring the minor issues with your code that others have pointed out.
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-253850">
<font size="-1"><i>
<br>---<br>
It's all fine and dandy until someone has to look at the code.
</i></font>
</div></div>
757478
757478