perlmysqlconnect.pl:
#!/usr/bin/perl
# PERL MODULE
use Mysql;
# HTTP HEADER
print "Content-type: text/html \n\n";
# CONFIG VARIABLES
$host = "localhost";
$database = "store";
$tablename = "inventory";
$user = "username";
$pw = "password";
# PERL MYSQL CONNECT
$connect = Mysql->connect($host, $database, $user, $pw);
that was on the tutorial , just google for more info