in reply to Re^2: Very weird things when printing (may be an encoding issue?)
in thread Very weird things when printing (may be an encoding issue?)

I opened the file with hex editor and found that odd lines end with "OA" (LineFeed), and even lines end with "OD" (CarriageReturn). And so here I am again, seeking for Perl wisdom at the monastery.

 perl -pi  -e " s/[\r\n]+/\n/g; " file
dos2unix/Removing ^M char AKA dos2unix
PerlIO::eol - PerlIO layer for normalizing line endings
Text::FixEOL - Canonicalizes text to a specified EOL/EOF convention, repairing any 'mixed' usages
File::LocalizeNewlines - Localize the newlines for one or more files