in reply to Re: What is clear code ?
in thread What is clear code ?

tadman said:
$fix =~ s!\r\n$!!s;
Notice the '$' mark in the line: it anchors the '\r\n' to the end of string. Meaning, replace \r\n only if it appears as the last thing in the string.