DBI
- DBI, portable Perl interface to any (SQL) database
- $dbh = DBI->connect("dbi:Pg:", $user, $pass);
- $dbh->do("insert into prices values ('foo', 1000)");
- $dbh->do("update prices set price = 1100 where item = 'foo'");
- $sth = $dbh->prepare("select a, b, c from ...");
- $sth->execute;
- while (($a, $b, $c) = $sth->fetchrow_array) { ... }