my $quoted_log = $dbi->quote_identifier($log) my $sql = "SELECT foo FROM $quoted_log";