in reply to CSV column names
Why so difficult???
$ cat info.csv id,count,desc,asc,row 1,2,foo,bar,10 $ cat test.pl #!/pro/bin/perl use 5.18.2; use warnings; use DBI; use Data::Peek; my $dbh = DBI->connect ("dbi:CSV:", undef, undef, { f_ext => ".csv/r" +}); my $sth = $dbh->prepare ("select * from info"); $sth->execute; while (my $row = $sth->fetchrow_hashref) { DDumper $row; } $ perl test.pl { asc => 'bar', count => 2, desc => 'foo', id => 1, row => 10 } $
|
|---|