in reply to Capturing Space with Split
$yline =~ s/\cM\cJ|\cM|\cJ/ /g;
That line is going to do absolutely nothing for you unless you change your input record separator as I pointed out before.