in reply to Re: Removing multiple newlines from a line using regex
in thread Removing multiple newlines from a line using regex

Hi,

Maybe I kindof understand the problem wrongly, but wouldn't it be more simple to use two substitution regexes like this:

$foo =~ s/\n//gs && $foo =~ s/\)/)\n/g;