DOIT: while (my $it = $csv->getline ($io)) { my (%rec, %HoH, $p); # chomp; # No need to chomp anymore! $t_counter++; # my @fields = @$it; # Don't make a copy if ($it->[0] =~ /^STOP/) { # use the reference : } elsif ($it->[0] ...