>OK: here's a dequote_like solution that solves it--the additional soluti<SNIP> >terminators allowing leading/trailing white space. Which is what I sugg<SNIP> >perl5, but would require shoving "POEM" to the left margin and ensuring <SNIP> >dequote Tom posted, with minor changes, and is given below. Maybe Tom c<SNIP> >improvement over "dequote". Clearly they could coexist, people could us<SNIP> >sub dequote_like { > local $_ = shift; > my ($leader); # common white space and common leading string > if (/^\s*(?:([^\w\s]+).*\n)(?:\s*\1.*\n)+$/) { > $leader = quotemeta($1); > } else { > $leader = ''; > } > s/^\s*$leader//gm; > return $_; >} > { { { { { > if( $is_fitting && $is_just ) { > die dequote_like('!', <<POEM); > ! The old lie > ! Dulce et decorum est > ! Pro patria mori. > POEM > } # this } had been omitted > } } } } } I am certainly in strong favor of a simple and visually distinctive solution, and find that the leading bit helps a lot. But I would probably have written that as: die <<POEM =~ /[^!]*/g; ! The old lie ! Dulce et decorum est ! Pro patria mori. POEM save for the whitespace on " POEM". --tom
- Re: RFC 111 (v3) Here Docs Ter... Nathan Wiger
- Re: RFC 111 (v3) Here Docs Ter... Michael G Schwern
- Re: RFC 111 (v3) Here Docs Ter... Nathan Wiger
- Re: RFC 111 (v3) Here Docs Ter... Richard Proctor
- Re: RFC 111 (v3) Here Docs Ter... Michael G Schwern
- Re: RFC 111 (v3) Here Docs Ter... Richard Proctor
- Re: RFC 111 (v3) Here Docs Ter... Glenn Linderman
- Re: RFC 111 (v3) Here Docs Ter... Nathan Wiger
- Re: RFC 111 (v3) Here Docs Ter... Glenn Linderman
- Re: RFC 111 (v3) Here Docs Ter... Tom Christiansen
- Re: RFC 111 (v3) Here Docs Ter... Tom Christiansen
- Re: RFC 111 (v3) Here Docs Ter... Glenn Linderman
- Re: RFC 111 (v3) Here Docs Ter... Tom Christiansen
- Re: RFC 111 (v3) Here Docs Termina... Bart Lateur
- Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace a... H . Merijn Brand
- Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace a... Richard Proctor
- Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace a... Eric Roode
- Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace a... Eric Roode
- Re: RFC 111 (v3) Here Docs Terminators (Was Whitesp... Richard Proctor
- Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace a... Richard Proctor
- Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace a... Eric Roode