in reply to CTRL M characters ?
First guess is that $file came from a CP/M-ish platform and has \cMs in it to begin with.
For more details, search for "newlines" in perlport