http://www.perlmonks.org?node_id=900455


in reply to Incosistent delimeter

$ cat csv.pl use warnings; use strict; use Text::CSV; use Data::Dumper; my $data = q|1, 2, 3,"a,b,c","d", 4|; my $csv = Text::CSV->new( {allow_whitespace => 1} ); $csv->parse($data); my @data = $csv->fields; print Dumper( \@data ), "\n"; $ perl csv.pl $VAR1 = [ '1', '2', '3', 'a,b,c', 'd', '4' ];

Don't forget exception handling!