or download this
use DBI;
my $dbh = DBI->connect("dbi:Pg:dbname='testing'", "postgres", "secret"
+, {AutoCommit => 0, RaiseError=>1,pg_enable_utf8=>1})or die "could no
+t connect to db\n";
...
$ret=$dbh->do("create table test (name varchar)")or die "could not exe
+cute\n";
$dbh->disconnect;
print "$ret\n";