http://www.perlmonks.org?node_id=359582

if($data !~ /^[\ -\~\007\012\015\035\036\037]*$/) { $data =~ tr/[\ -\~\007\012\015\035\036\037]/ /cs; }
I expect this to change everything except those characters in the regex into spaces, but $data contains letters, numbers, and a few other characters after this block of code. I don't understand why.