I though about it and I will extract the reports as the are and create the wanted report with Perl. But I still not sure how to do it.
It feels like I need to iterate through the inner array and then through the outer array.
Can you suggest an efficient way to do this? Will update my post.