$text =~ s/(\S)/(int rand 2) ? "$opening_tag$1$closing_tag" : $1/ge;