I'm not familiar with that module, but unless it returns references, I can imagine zero being a valid value in a final row. If zero is represented by [0] instead of 0 then maybe that's a non issue.
It sounds like you're expecting an empty string for an empty cell. In that case, you could check length or defined instead of truth.
grep in scalar context returns the number of items in the array that matched. I'm trying to make sure that there is at least 1 non-false value in the row. A row of all zeros would cause it to be skipped, but then that's bad data anyway:)
Probably this would have been more clear:
next unless grep $_, @row;
The module doesn't return rows in any nice way, it's a fantastically useful module but the interface seems too much like Visual Basic for my liking:
truth (Score:2)
I'm not familiar with that module, but unless it returns references,
I can imagine zero being a valid value in a final row. If zero is
represented by [0] instead of 0 then maybe that's a non issue.
It sounds like you're expecting an empty string for an empty cell.
In that case, you could check length or defined instead of truth.
-matt
Re:truth (Score:1)
Probably this would have been more clear:
The module doesn't return rows in any nice way, it's a fantastically useful module but the interface seems too much like Visual Basic for my liking:
Re:truth (Score:2)
I like the DBD::Excel wrapper, myself, but it may not suit your purposes.
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers