in reply to Re^2: Remove new line characters
in thread Remove new line characters

You can simplify that:
$line =~ tr/\x0a\x0d//d;