Perl, DBI mySQL help
Hi all,
I'm trying to access databases with perl,
and I just dont get why it is not working.
I am using acitvePerl on WinXP
I have installed DBI and DBD:mysql
using ppm
I have checked that DBI.pm
is in C:\perl\site\lib
which is in my perl path
this is the code i'm running:
#!perl -sw
use strict;
use DBI;
print "Here's a list of DBI drivers:\n";
my @available_drivers = DBI->available_drivers();
my $driver;
foreach $driver (@available_drivers)
{
print "$driver\n";
}
this is the output
Here's a list of DBI drivers:
Can't locate object method "available_drivers" via package "DBI"
(perhaps you forgot to load "DBI"?) at DBI.pl line 7.
what does "forgot to load " mean?
Any perl & DBI experts out there got any advice?
Much appreciated
Frazer
I'm trying to access databases with perl,
and I just dont get why it is not working.
I am using acitvePerl on WinXP
I have installed DBI and DBD:mysql
using ppm
I have checked that DBI.pm
is in C:\perl\site\lib
which is in my perl path
this is the code i'm running:
#!perl -sw
use strict;
use DBI;
print "Here's a list of DBI drivers:\n";
my @available_drivers = DBI->available_drivers();
my $driver;
foreach $driver (@available_drivers)
{
print "$driver\n";
}
this is the output
Here's a list of DBI drivers:
Can't locate object method "available_drivers" via package "DBI"
(perhaps you forgot to load "DBI"?) at DBI.pl line 7.
what does "forgot to load " mean?
Any perl & DBI experts out there got any advice?
Much appreciated
Frazer
