in reply to Re^3: isn't numeric in substr error
in thread isn't numeric in substr error

After foreach my $criterion (@criteria) { (presumably line 228), you should inspect the values of the variables used in both of these:

$reportHash{"all"}{$criterion}{$worksheet{$criterion}}{"reportHandle"} $reportHash{"all"}{$criterion}{$worksheet{$criterion}}{"total"}

Data::Dumper may help with the overall hash but you'll still need to inspect the variables $criterion and $worksheet{$criterion} so you know what keys to look for. Determine what hasn't been set (resulting in an undefined value) and fix that.

I'd also take a close look at wrapUp(). You're reading in 6 arguments but only using 2 of them. And, what's 16? Don't tell me - document it in your code! Also, are you aware that $y is incremented after the call to write() which actually makes the increment pointless: perhaps you want a prefix increment ++$y instead; although, with the code you have there, you might as well just write 17 and document that.

-- Ken