thegoaltender has asked for the wisdom of the Perl Monks concerning the following question:
$test[0][0] = 'No'; $test[0][1] = 'Letter'; $test[0][2] = 'Roman'; $test[1][0] = 1; $test[1][1] = 'a'; $test[1][2] = 'i'; $test[2][0] = 2; $test[2][1] = 'b'; $test[2][2] = 'ii'; $test[3][0] = 3; $test[3][1] = 'c'; $test[3][2] = 'iii'; $test[4][0] = 4; $test[4][1] = 'd'; $test[4][2] = 'iv'; $test[5][0] = 5; $test[5][1] = 'e'; $test[5][2] = 'v'; $test[6][0] = 6; $test[6][1] = 'f'; $test[6][2] = 'vi'; $dbh = DBI->connect('dbi:AnyData(RaiseError=>1):'); $dbh->func( 'testtable', 'ARRAY', @test, 'ad_import');
This gives the following error:
Can't coerce array into hash at C:/Perl/site/lib/DBD/AnyData.pm line 247.
I don't currently see what the difference is from the following (which works):
@test = [ ['No','Letter','Roman'], [1,'a','i'], [2,'b','ii'], [3,'c','iii'], [4,'d','iv'], [5,'e','v'], [6,'f','vi'] ]; $dbh = DBI->connect('dbi:AnyData(RaiseError=>1):'); $dbh->func( 'testtable', 'ARRAY', @test, 'ad_import');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: DBD::AnyData & Array of Arrays
by merlyn (Sage) on Dec 31, 2003 at 20:25 UTC | |
by thegoaltender (Sexton) on Jan 02, 2004 at 15:46 UTC |