in reply to Re^2: Perl Issue - File downloaded in windows has a Control M character in it??
in thread Perl Issue - File downloaded in windows has a Control M character in it??

s/\r\n/\n/g should do it.

See perldoc perlop and search for "Regex Quote-Like Operators." Also see perldoc perlre.

This command replaces the \r\n sequence with \n for every occurrence in the string.

Most of the time these commands invoke sed scripts, which can apply a regular-expression to modify the content of a file.
  • Comment on Re^3: Perl Issue - File downloaded in windows has a Control M character in it??