You will need to get the perl script to auth via the database (mysql in most cases), and this will require you to use perl modules like DBI and CGI.
If you don't have these modules, you can use CPAN to get them (
www.cpan.org).
Here's a "start" for you to wet your whistle:
Code:
#!/usr/bin/perl -w
use strict;
use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser); # Invoke fatal error messages at compile time.
use DBI;
sub dbConnect() {
my ($dsn) = "DBI:mysql:dbname:localhost";
my ($user_name) = "";
my ($password) = "";
my ($dbh);
$dbConnect = DBI->connect ($dsn, $user_name, $password, { RaiseError => 1 });
return $dbConnect;
}
my $query = CGI->new();
my( $username ) = $query->param("username");
my( $password ) = $query->param("password");
# connect to database
my $dbh = dbConnect();
my $sql = qq{
SELECT userid
FROM user
WHERE username=? AND password=MD5(?)
};
my $sth = $dbh->prepare( $sql );
$sth->execute( $username, $password );
my( $userid ) = $sth->fetchrow;
if($userid){
#logged in
}else{
#not logged in
}
exit 0;
You probably want to use Regular Expression to clean up those inputs (username/password) - just to prevent SQL injection

Do a google for perl login scripts - you'll see plenty of examples.