Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi, i am making a program that queries a csv file using the DBI module, but can't find out how to get the column names. Can someone help me out. tx.
use DBI; $dbh = DBI->connect("DBI:CSV:"); $dbh->{'csv_tables'}->{'info'}={'file'=>'info.csv'}; $qu = $dbh->prepare("SELECT * From info"); $qu->execute(); while (@row = $qu->fetchrow_array){ print "@row\n";}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CSV column names
by Mr. Muskrat (Canon) on Aug 23, 2016 at 17:35 UTC | |
by Marshall (Canon) on Aug 23, 2016 at 21:45 UTC | |
by Mr. Muskrat (Canon) on Aug 23, 2016 at 22:14 UTC | |
by Anonymous Monk on Aug 27, 2016 at 10:49 UTC | |
by erix (Prior) on Aug 27, 2016 at 11:04 UTC | |
by Anonymous Monk on Aug 27, 2016 at 11:27 UTC | |
by Mr. Muskrat (Canon) on Aug 29, 2016 at 13:51 UTC | |
|
Re: CSV column names
by Cristoforo (Curate) on Aug 23, 2016 at 16:43 UTC | |
by Anonymous Monk on Aug 23, 2016 at 17:06 UTC | |
|
Re: CSV column names
by Tux (Canon) on Aug 27, 2016 at 15:28 UTC | |
|
Re: CSV column names
by Anonymous Monk on Aug 24, 2016 at 05:34 UTC |