in reply to Not an ARRAY reference Error Help!
That is, first you fetch a hash reference and then you treat it like an array. On the other hand, you also didn't check the return code of the DB connect andfor (my $i = 0; $i < @{$data}; $i++) {
should likely be or die "...". You have more problems than you think. You should start with the smallest working code you can and then add 1 thing at a time verifying it at each stage.my $sth = $dbh->prepare($sql) or "Can't select from table: ",$dbh->err +msg;
Cheers - L~R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Not an ARRAY reference Error Help!
by Anonymous Monk on Jan 13, 2011 at 19:32 UTC | |
by Limbic~Region (Chancellor) on Jan 13, 2011 at 19:49 UTC | |
by derby (Abbot) on Jan 13, 2011 at 19:47 UTC |