Ok, I'm running Postgres and RH8 right out-of-the-box. DBD::Pg is installed, and I'm using Perl 5.8 -- all right out-of-the-box. When my script gets to this line:
$statementH = execute() || die $statementH->errstr ; # this is line 10 btw
I get:
Undefined subroutine &main::execute called at ./test.pl line 10.
As far as I can tell, it should work --but doesn't so I must be missing something. If you want to tackle this one, everything is right below: (PS: the query going into $sql I got with help of you all, so thanks!)
========
#! /usr/bin/perl -w
use DBI ;
$dbH = (DBI->connect("DBI:Pg:dbname=lanparty-reservations","andrew","shrp1234")) ;
$sql = "select c.relname as table from pg_class c where c.relkind = 'r' and c.relname !~ '^pga_' and c.relname !~ '^pg_'" ;
$statementH = $dbH->prepare($sql) ;
$statementH = execute() || warn $statementH->errstr ;
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable.
Sign up now