in reply to Removing Control Characters from a File
while (<>) { s/\cX//g; # removes ^X's s/\cM//g; # removes ^M's ... } [download]