in reply to rtf newline remove

You've got too many slashes. The expression you want will likely look like:

$str =~ s/line//g;

where "line" should be replaced by whatever you are trying to eliminate. See perlre or perlretut for information on using regular expressions. We could give better guidance if you included some input and expected output - see How do I post a question effectively?.