use warnings; use strict; use DBI; my $dbh = DBI->connect("dbi:Pg:dbname=pdqtest;host=localhost", "Owner", "", {RaiseError=>1}, ); dbh->do("create table mytmptbl (fld1 timestamp, fld2 integer)"); my $sql = qq{ INSERT INTO mytmptbl VALUES ( current_timestamp, ? ) }; my $var = 3; $dbh->do($sql, undef, $var); $dbh->disconnect;