in reply to Re^2: Changing quoted strings spanning more than one line
in thread Changing quoted strings spanning more than one line
Tad more complicated:
$_ = do{ local $/; <DATA> }; s[("[^\n"]*?")|("[^\n"]+?\n[^"]+?")][ ##" $1 || do{ (my $x = $2) =~ s[\s+][ ]g; $x } ]ge; print; "boom" hello "" bill hello " " bill "baz hello jock" "boom2" abc "baz2 hello2 jock2 "
|
|---|