padawan_linuxero has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; use DBI(); my $dbh = DBI->connect("DBI:mysql:database=test;host=localhost", "root", "123xyz", {'RaiseError' => 1}); my $sth = $dbh->prepare("SELECT * FROM regtest"); $sth->execute(); while ((@row) = $sth->fetchrow_array()) { print "@row\n"; } $sth->finish(); $dbh->disconnect();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: "use strict" and undeclared variables
by moritz (Cardinal) on Oct 11, 2007 at 14:31 UTC | |
|
Re: "use strict" and undeclared variables
by toolic (Bishop) on Oct 11, 2007 at 14:36 UTC | |
|
Re: "use strict" and undeclared variables
by roboticus (Chancellor) on Oct 11, 2007 at 14:33 UTC | |
|
Re: "use strict" and undeclared variables
by ikegami (Patriarch) on Oct 11, 2007 at 19:46 UTC | |
|
Re: "use strict" and undeclared variables
by leocharre (Priest) on Oct 11, 2007 at 19:39 UTC | |
by mjscott2702 (Pilgrim) on Oct 11, 2007 at 20:16 UTC | |
by chrism01 (Friar) on Oct 12, 2007 at 00:37 UTC | |
by polettix (Vicar) on Oct 12, 2007 at 08:49 UTC | |
by blazar (Canon) on Oct 12, 2007 at 12:31 UTC | |
by leocharre (Priest) on Oct 18, 2007 at 18:19 UTC |