in reply to dbi::CSV works with text, but not numbers
Welcome to the Monastery, Sandy_Bio_Perl!
update: I found the issue. When $row is populated from the DB, all of the column names get lower-cased. So if you change tGroup to tgroup when accessing it in row, that should fix the problem. /update
What I'd do, is dump out the entire row using Data::Dumper. Add a use Data::Dumper; near the top of the script, and then:
while (my $row = $sth->fetchrow_hashref) { print Dumper $row; next; }
...and check to ensure that the structure contains the proper keys and values. Note that the keys in $row are case-sensitive. If your DB has a lot of rows, you may want to replace next with last, especially if you can trigger the warning on the first iteration.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DBD::CSV works with text, but not numbers
by Tux (Canon) on May 20, 2016 at 05:26 UTC | |
by Sandy_Bio_Perl (Beadle) on May 20, 2016 at 10:11 UTC | |
by Tux (Canon) on May 20, 2016 at 12:03 UTC | |
|
Re^2: dbi::CSV works with text, but not numbers
by Sandy_Bio_Perl (Beadle) on May 20, 2016 at 10:08 UTC |