in reply to Issue parsing CSV into hashes?

Without @columns (look at allow_loose_quotes, escape_char and especially at sep_char)

use Text::CSV_XS; use strict; use warnings; my $csvfile = shift or die "No filename specified"; my $csv = Text::CSV_XS->new( { quote_char => '"', sep_char => ",", binary => 1, allow_loose_quotes => 1, escape_char => '\\'} ); my @columns; open(FILE, $csvfile) or die "Can't open $csvfile: $!"; my %hash; while (<FILE>) { $csv->parse($_) or die "parse() failed: " . $csv->error_input( +); my @data = $csv->fields(); foreach my $pair (@data) { my ( $key, $value ) = split /:/, $pair; $hash{$key} = $value; } } close(FILE); use Data::Dumper; print Dumper(\%hash);