$comment = "

" . (join '

', grep {!/^\s+$/} split /[\n\r]+/, $comment) . "

";