in reply to Changing quoted strings spanning more than one line
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 "
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Changing quoted strings spanning more than one line
by eyepopslikeamosquito (Archbishop) on Sep 19, 2007 at 05:41 UTC | |
by BrowserUk (Patriarch) on Sep 19, 2007 at 06:55 UTC |