Your substitutions are not global substitutions - they replace only the first instance of the template in a string. To make a global replacement, add g after the last slash, for example:
$description =~ s/\r//g; $description =~ s/\n//g;
You can also combine two substitutions into one substitution using a character set:
$description =~ s/[\n\r]//g;
source share