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