use v5.12; use warnings; use autodie qw( :all ); use Data::Peek; use DBI; open my $fh, ">:encoding(utf-8)", "test.csv"; say $fh qq<\x{FEFF}"foo","bar","baz">; say $fh qq<"1","2","3">; say $fh qq<"4","5","6">; close $fh; my $dbh=DBI->connect ("dbi:CSV:", undef, undef, { RaiseError => 1, PrintError => 0, f_ext => ".csv/r", csv_bom => 1, }); my $sth=$dbh->prepare ("select * from test"); $sth->execute (); while (my @a = $sth->fetchrow_array ()) { DDumper \@a; } $sth->finish ();