Without your data I can only guess that split is giving you an empty $fields[5] from one of the data rows.
There are lots of pitfalls in parsing CSV, which is why you'll have numerous responses telling you to use one of the many CSV modules on CPAN. My recommendation is Text::CSV_XS.
In reply to Re: Question on loops and variables
by keszler
in thread Question on loops and variables
by bogonspace
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |