in reply to Changing quoted strings spanning more than one line
$/= '"'; while( <> ) { s/\s+/ /g if 0 == $. % 2 && /\n/; print; }
Update: Changed "if 0 == ( 1 & $. );" because the bit-op was a bit silly and to leave single-line strings uncollapsed.
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Changing quoted strings spanning more than one line ($/)
by GrandFather (Saint) on Sep 19, 2007 at 04:01 UTC | |
by eyepopslikeamosquito (Archbishop) on Sep 19, 2007 at 04:19 UTC |