use Text::CSV_XS; $csv = Text::CSV_XS->new(); # create a new object $csv->types(\@t_array); # Set column types $columns = $csv->getline($io); # Read a line from file $io, parse it # and return an array ref of fields