in reply to Removing Control Characters from a File

You could use \c
while (<>) { s/\cX//g; # removes ^X's s/\cM//g; # removes ^M's ... }