use Text::CSV::Hashify; use Data::Dumper; my $filename = 'bad.csv'; $obj = Text::CSV::Hashify->new( { file => $filename, format => 'hoh', key => "PRODUCT CODE", quote_char => "'", escape_char => "|", #wont be found in the data, turn off escaping auto_diag => 1, } ); print Dumper($obj->all);