in reply to Re: read the whole folder files
in thread read the whole folder files
Well, the warning says there is an uninitialized value in a pattern match, so clearly that means that $energy_consumption is undefined when you get there. That value is assigned in your split, so therefore the split isn't outputting at least 8 values. I suspect that your input file is not formatted as your expect. A quick way to find the offending lines would be to add the block
if (not defined $energy_consumption) { warn "Split missed, $file: $_"; next; }
after the split, and see what comes out. My guess is that you are working with tab-delimited files, and there are some empty values.
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: read the whole folder files
by perllearner007 (Acolyte) on Apr 10, 2012 at 19:09 UTC | |
by kennethk (Abbot) on Apr 10, 2012 at 20:40 UTC |