[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Database Handle and Global Subs
I trying to run a database query in a global tag but am running into a
problem with getting access to the database.
I'm using the following code
sub test{
use DBI;
my $dbh = DBI->connect("DBI:mysql:$dbname", $dbuser, $dbpasswd);
.....
}
and I get an error saying
Can't locate object method "connect" via package "DBI" at (eval 91) line 14.
Can anybody shed some light on why this won't work.
Thanks
Sheamus