in reply to DBD::CSV forgets a column and a row?
I think you mean ==, not =.if ( $chk = $row[2]) {
And merlyn is correct that, by default, DBD::CSV expects the first row in the data file to be the column names. You can satisfy that by either adding the column names to the top of the file, OR, by setting the col_names flag. If the col_names flag is unset, the module will eat the first row and expect it to be column names. If the col_names flag is set, the module will treat the first row as data. For example:
$dbh->{'csv_tables'}->{'comp'} = { 'file' => 'DUDS.csv' , eol => "\n" , col_names => [qw( c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 )] };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DBD::CSV forgets a column and a row?
by McMahon (Chaplain) on Aug 16, 2004 at 15:52 UTC | |
by jZed (Prior) on Aug 16, 2004 at 15:54 UTC | |
by McMahon (Chaplain) on Aug 16, 2004 at 15:59 UTC |