I just trying to run the below perl script and got the following error. Any 
suggesstion pls.
  # more training1.pl
  #!/usr/bin/perl
  use DBI;
  $mysocket="/var/mysql.sock";
  $dsn="dbi:mysql:training;mysql_socket=$mysocket";
  $user="demo";
  $password="demo";
  $dbh=DBI->connect($dsn,$user,$password)||die "cannot connect";
  $sth=$dbh->prepare("SELECT * FROM telephone");
  $sth->execute();
  while(@row=$sth->fetchrow_array) {
  print "@row\n";
  }
  $dbh->disconnect();    

t# ls -al training1.pl
-rwxr-xr-x   1 mysql    mysql        357 Mar  3 18:26 training1.pl
# perl training1.pl
Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib/perl5/5.00503/sun4-so
laris /usr/local/lib/perl5/5.00503 /usr/local/lib/perl5/site_perl/5.005/sun4-sol
aris /usr/local/lib/perl5/site_perl/5.005 .) at training1.pl line 3.
BEGIN failed--compilation aborted at training1.pl line 3. 

Reply via email to