in reply to Re: 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??

what regular expression? i am new to perl and i have been assigned to do this...i am an ETL guy
  • Comment on Re^2: Perl Issue - File downloaded in windows has a Control M character in it??

Replies are listed 'Best First'.
Re^3: Perl Issue - File downloaded in windows has a Control M character in it??
by Anonymous Monk on Oct 24, 2012 at 22:57 UTC
    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.