The same example, using Pg...
# use Pg;
# my $dbh = Pg::connectdb("dbname=<dbname>");
# my $sth = $dbh->exec("<SQL STATEMENT>");
# for (my $i = 0; $i < $sth->ntuples; $i++) {
# for (my $j = 0; $j < $sth->nfields; $j++) {
# print "Value at ($i,$j):
$sth->getvalue($i,$j)\n";
# }}
It is more concise, and more intuitive.
It is a pity that DBI is so cumbersome.
Yes, DBI is faster and independent from specific
databases, but Pg is far more elegant. Too bad one
cannot have both worlds.
____________________________________________________________________________________
Get your own web address.
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL