my $csv = Text::CSV_XS->new ({ quote_char => '"', sep_char => ":", binary => 1, }); my @columns; open (FILE, $csvfile) or die "Can't open $csvfile: $!"; while () { $csv->parse ($_) or die "parse() failed: " . $csv->error_input (); my @data = $csv->fields (); for my $i (0..$#data) { push @{$columns[$i]}, $data[$i]; } #### my $csv = Text::CSV_XS->new ({ binary => 1, auto_diag => 1, allow_loose_quotes => 1, }); my @columns; open my $fh, "<", $file or die "$file: $!"; while (my $row = $csv->getline ($fh)) { for (@$row) { my ($key, $value) = split m/"?:"?/, $_, 2; # ... }