in reply to Return array not passed to sub call

Look at the arguments you're passing to getValidTotals() and then look at the arguments you're expecting in that routine.

If you had use warnings; in your code, you would have seen:

Use of uninitialized value $reportGroup in string ne at ...

-- Ken