$dbh->do( "CREATE TABLE $table (" . "blah," . "line text UNIQUE," . "col" . ");" ) or die "Cannot create table: $DBI::errstr"; $sth = $dbh->prepare("INSERT INTO $table VALUES(?,?,?)"); #$sth->bind_param(2,"$fld2",DBI::SQL_VARCHAR); print $fld2; #prints 0002 $sth->execute($fld1,$fld2,$fld3);