in reply to Remove Carriage Return

I usually remov all \012 and \015 in order to get the most universal solution for removing line ends.
s/[\012\015]+//g
This works okay on all systems I know of.
Only disadvantage is: You can never tell how many lines you really had as long as you don't know, how a line end is represented in your file.

$\=~s;s*.*;q^|D9JYJ^^qq^\//\\\///^;ex;print