簡単ではないんじゃね?

$text =~ s/(?:<pre>.*<\/pre>|(?:^|(?<=\n))(.))/($1)?" $1":$&/sge;