in reply to grep all matches

Replace

my ($failedTest) = grep { /FAIL/ } @reportContents; ...

with

for my $failedTest (grep { /FAIL/ } @reportContents) { ... }

🦛