sub NOW { # Return current time in whatever format it # Needs to be in } $sth->execute(NOW()); #### my $sth = $dbh->prepare(q{ INSERT INTO t ( foo, bar, time ) VALUES (?, ?, NOW() ) }); $sth->execute($foo, $bar);