in reply to DBI::CSV using a variable to request columns
You're trying to populate $columns before you've even populated $row out of the DB. You need to do this within the while() loop (perhaps with a count variable so that it only runs on the first pass). Also, you declare $queryResult, but then later use it in a very strange way.
What is your goal for $queryResult? Is it to add the headers, then append details from every row?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DBI::CSV using a variable to request columns
by Sandy_Bio_Perl (Beadle) on May 20, 2016 at 15:01 UTC | |
by soonix (Chancellor) on May 20, 2016 at 19:51 UTC | |
by Sandy_Bio_Perl (Beadle) on May 20, 2016 at 21:42 UTC | |
by Corion (Patriarch) on May 20, 2016 at 20:00 UTC | |
by Sandy_Bio_Perl (Beadle) on May 22, 2016 at 14:53 UTC |