# You can create a database handle using DBI:
use DBI;
my $dbh = DBI->connect("DBI:mysql:database=mydatabasename;host=mydatabaseserver", "databaseusername", "databasepassword"

;
# then you do inserts like this:
$dbh->do(qq(INSERT INTO tablename VALUES(a,b,c)));
# updates like this:
$dbh->do(qq(UPDATE tablename SET field="value" WHERE otherfield="somevalue"

);
# deletes like this:
$dbh->do(qq(DELETE FROM tablename WHERE otherfield="somevalue"

);
# and selects something like this:
my $sth = $dbh->prepare(qq(SELECT x,y,z FROM tablename WHERE myfield="somevalue"

);
$sth->execute();
while(my @arr = $sth->fetchrow_array()) {
print qq($arr[0] $arr[1] $arr[2]\n);
}
# and definitely read perldoc DBI for tuning these calls
YMMV