&main::execute undefined?

From: Andrew Magnus <xanadian99(at)yahoo(dot)com>
To: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: &main::execute undefined?
Date: 2002-11-21 05:37:33
Message-ID: 20021121053733.33885.qmail@web21503.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Noah Smith 2002-11-21 05:50:38 encryption
Previous Message Lamar Owen 2002-11-21 05:29:45 Re: Dumb Newbie Question - Mandrake 9.0 / PGSQL 7.2