This is a bit simpler and produces the correct result from your sample.
$_ = do{ local $/; <DATA> }; s[("[^\n"]+\n[^"]+")][ (my $x = $1) =~ s[\s+][ ]g; $x ]ge; print; "boom" hello "" bill "baz hello jock" "boom2" abc "baz2 hello2 jock2 "
In reply to Re: Changing quoted strings spanning more than one line
by BrowserUk
in thread Changing quoted strings spanning more than one line
by eyepopslikeamosquito
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |