in reply to ^M chars in output file

Hi
My experience is,

^M lines at end of ines may be that file was created as a DOS format file and you are seeing in Unix environment.

Did you try dos2unix command in linux

Replies are listed 'Best First'.
Re^2: ^M chars in output file
by codeacrobat (Chaplain) on Nov 20, 2010 at 13:02 UTC
    Or just remove all ^M with a one-liner
    perl -pi -e 'tr[\r][]d' file

    print+qq(\L@{[ref\&@]}@{['@'x7^'!#2/"!4']});