AV-2 has asked for the wisdom of the Perl Monks concerning the following question:
When I run it I get this output:use DBI; use strict; my $db = DBI->connect(qq/DBI:CSV:/); eval{$db->do('CREATE TABLE bug (a int, b int)')}; $db->do("INSERT INTO bug VALUES(0, 0)"); $db->do("update bug set a = 1"); eval{$db->do("update bug set b = 1 + 1")}; eval{$db->do("update bug set b = 1 - 1")}; eval{$db->do("update bug set b = 1 * 1")}; eval{$db->do("update bug set b = 1 / 1")};
DBD::CSV::db do failed: Can't use an undefined value as an ARRAY refer +ence at /usr/lib/perl5/site_perl/5.10/SQL/Statement.pm line 1777, <GE +N2> line 2. [for Statement "update bug set b = 1 + 1"] at /cygdrive/c/Users/Profe +sional/perl/databases/bug.pl line 9. DBD::CSV::db do failed: Can't use an undefined value as an ARRAY refer +ence at /usr/lib/perl5/site_perl/5.10/SQL/Statement.pm line 1777, <GE +N3> line 2. [for Statement "update bug set b = 1 - 1"] at /cygdrive/c/Users/Profe +sional/perl/databases/bug.pl line 10. DBD::CSV::db do failed: Can't use an undefined value as an ARRAY refer +ence at /usr/lib/perl5/site_perl/5.10/SQL/Statement.pm line 1777, <GE +N4> line 2. [for Statement "update bug set b = 1 * 1"] at /cygdrive/c/Users/Profe +sional/perl/databases/bug.pl line 11. DBD::CSV::db do failed: Can't use an undefined value as an ARRAY refer +ence at /usr/lib/perl5/site_perl/5.10/SQL/Statement.pm line 1777, <GE +N5> line 2. [for Statement "update bug set b = 1 / 1"] at /cygdrive/c/Users/Profe +sional/perl/databases/bug.pl line 12.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Old bug with SQL::Statement
by andreas1234567 (Vicar) on Feb 21, 2008 at 07:23 UTC | |
by AV-2 (Novice) on Feb 21, 2008 at 21:10 UTC |