my $script = param('select') or ...; ... $dbh->do("UPDATE guestlog SET script=? WHERE host=?", undef, $script, $host);