quote works, but you can let DBI do all the work.
Code:
$SQL = qq(UPDATE Flags SET Condition = ?,SkillCoach = ?,Notes = ? WHERE ID = ?);
$dbh->do($SQL, {}, $updatecondition, $updateskillcoach, $updatenotes, $recordid) or die "$DBI::errstr";
Read about placeholders and bind values here. There's also a section describing how the do method works.
To print the SQL you're trying to pass, just: