in reply to Multiple Search and Replace in Single Line

well if it's absolutely necessary that the second replacement occurs only after the first has finished, you need a loop.

something like

 $var =~ s/$_//g for qw(\n \s+);

Cheers Rolf