in reply to Removing Non-Ascii chars from text file

perl -pe '($c,$d)=(32,126); s/(.)/(ord($^N)>$c-1 and ord($^N)<$d+1)?$^ +N:""/ge;'
(There are much better solutions available if you don't want to specify a range, but something like this is what I gathered from your post.)