#! /usr/bin/perl use DBI; use strict ; my $dsn = "DBI:mysql:database=test;host=localhost"; my $dbh = DBI->connect($dsn, "root", ""); my $sth = $dbh->prepare("INSERT INTO t1 (a,b) VALUES(?,?)") ; my @a = (undef,undef ) ; $sth->execute(@a) ; $dbh->disconnect() ;