in reply to Changing quoted strings spanning more than one line
$s =~ s!"([^"]*)"!local $_ = $1; s/\s+/ /g if /\n/; "\"$_\""!seg;
which is basically your solution golfed down a bit (but still not too obfuscated).
I wonder how the $1 =~ tr/\n// in your solution doesn't die with "modification of a readonly value attempted"?
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Changing quoted strings spanning more than one line
by eyepopslikeamosquito (Archbishop) on Sep 19, 2007 at 20:01 UTC | |
by shmem (Chancellor) on Sep 19, 2007 at 20:15 UTC | |
|
Re^2: Changing quoted strings spanning more than one line (modifying constants)
by ikegami (Patriarch) on Sep 19, 2007 at 20:23 UTC | |
by shmem (Chancellor) on Sep 19, 2007 at 20:46 UTC | |
by ikegami (Patriarch) on Sep 19, 2007 at 21:01 UTC |