in reply to Re^6: problems parsing CSV
in thread problems parsing CSV
You are now mixing two approaches. When using bind_columns () you should not use getline_hr () but getline (), because you are not returning a hashref but reading into prebound variables:
my @column_labels = @{$csv->getline ($release_fh)}; $csv->bind_columns (\@value{@column_labels}); while ($csv->getline ($release_fh)) { : }
You do not use the method column_names () at all. That was a cut-n-paste error from your code in my previous example. Mea culpa.
\@value{@{$csv->column_names ($csv->getline ($release_fh))}} => \@value{@{$csv->getline ($release_fh)}};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: problems parsing CSV
by Jim (Curate) on Oct 13, 2010 at 16:36 UTC |