while ( my $row = $csv->getline( $fh ) ) { if($row->[0] >=1101227) { $Values[$cnt++] = $row->[0]; $Values[$cnt++] += $row->[1]; $Values[$cnt++] += $row->[2]; $Values[$cnt++] += $row->[3]; $Values[$cnt++] = $row->[4]; $Values[$cnt++] = $row->[5]; $Values[$cnt++] = $row->[6]; $Values[$cnt++] = $row->[7]; # $Values[$cnt++] = "\n"; } # reset $cnt per csv-row? #$cnt = 0; }