Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re^4: isn't numeric in substr error

by kcott (Chancellor)
on Nov 17, 2010 at 18:08 UTC ( #872029=note: print w/replies, xml ) Need Help??

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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://872029]
[choroba]: timestamps almost working!
[choroba]: New version of pm-cb-g pushed to GitHub

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2017-09-19 19:42 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (227 votes). Check out past polls.