List:General Discussion« Previous MessageNext Message »
From:Richard Reina Date:July 30 1999 3:06am
Subject:Newbie perl script error
View as plain text  
Hate to be a bother but I trying to get the simple script below to work
but get the following error message:

[root@dyn1-tnt9-20 DBI-1.08]# perl rush2.pl
Can't locate loadable object for module DBI in @INC (@INC contains:
/usr/lib/perl5/i386-linux/5.00404 /usr/lib/perl5
/usr/lib/perl5/site_perl/i386-linux /usr/lib/perl5/site_perl .) at
DBI.pm line 0
BEGIN failed--compilation aborted at DBI.pm line 150.
BEGIN failed--compilation aborted at rush2.pl line 3.
[root@dyn1-tnt9-20 DBI-1.08]#


Did I not install DBI correctly?

#!/usr/bin/perl

use DBI;
use strict;
my $dbh = DBI->connect('DBI:mysql:rush_load', 'root',
                       'rr8663');

die "connect failed: $DBI::errstr" unless $dbh;

my $sth = $dbh->prepare("insert into tablename
                       (name,email,phone_number)
                       values
                       ('Bill Watkins','Bill@stripped','601-353-8671')
                       ");

die "prepare failed:", $dbh->errstr unless $sth;

$sth->execute;

$sth->execute or die "execute failed:", $sth->errstr;

$dbh->disconnect;


Thread
Newbie perl script errorRichard Reina30 Jul
  • Newbie perl script errorJani Tolonen30 Jul
  • Re: Newbie perl script errorRichard Reina1 Aug
    • Re: Newbie perl script errorPaul DuBois2 Aug
  • Re: Newbie perl script errorSasha Pachev2 Aug