Amit,
you should use dbi-dbd interface for connecting the perl with mysql.
here is an example:
#!/usr/bin/perl
use CGI;
use DBI;
$q=new CGI;
print $q->header;
$dbh=DBI->connect('dbi:mysql:databasename','username','pwd');
#connect to the database ..
#enter your database name ,username and password to the connection string..
$sql="SELECT * FROM tblname";
print "Database Connectedn";
$sth = $dbh->prepare($sql)
or die "Can't prepare $sql: $dbh->errstrn";
#pass sql query to database handle..
$rv = $sth->execute
or die "can't execute the query: $sth->errstrn";
#execute your query
if ($rv==0){
#no rows fetched..
print "No Recordsn";
}else{
#record is available in your table
while(@row = $sth->fetchrow_array) {
print $row[0];
#print first column
}
}
hope this may help you to connect perl with mysql.
GOOD LUCK!!!!
------------------
SR -
shiju.dreamcenter.net