3 messages in com.mysql.lists.perlRe: installation problem
FromSent OnAttachments
Nate05 Aug 2002 04:44 
Dwalu Z. Khasu05 Aug 2002 05:08 
Clinton Hogge05 Aug 2002 21:15 
Subject:Re: installation problem
From:Dwalu Z. Khasu (dwa@cs.bu.edu)
Date:08/05/2002 05:08:35 AM
List:com.mysql.lists.perl

On Mon, 5 Aug 2002, Nate wrote:

=>I recently used the ppm feature on my activeperl (Win32) to install both the DBI package and the DBD-mysql modules. looking through the documentation this seems to be all i need to do to access MySQL through perl. However When i try to run my script i get an error that says the following: => =>Global symbol "$dbh" requires explicit package name at dbi.pl => =>the entire script reads as follows: => =>#!c:/perl/bin/perl.exeuse strict;use DBI;$dbh = DBI->connect("DBI:mysql:database=mvc2;host=localhost", "", "", {RaiseError => 1});$dbh->do("CREATE TABLE foo (id INTEGER, name VARCHAR(20)"); => =>What is the problem? How do i resolve it? => Nate,

Try 'my $dbh' after 'use DBI;' -- The 'use strict' pragma requires lexical scoping of all variables.

- Dwalu .peace