Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Set Array Columns to 0by brx (Pilgrim) |
on Jul 05, 2012 at 16:41 UTC ( [id://980112]=note: print w/replies, xml ) | Need Help?? |
When you split the line, the result can be a list which contains less elements than you are expecting. Thurs,July,5,2012,123,456,789 : here you'll obtain 7 elements, no more. So, do not trust the input and don't forget to chomp your lines. Here, I'm using an additional list of 11 empty string ("" is not undef) to be sure that all (11) variables are defined.
In Section
Seekers of Perl Wisdom
|
|