Michael G Schwern wrote: > > No, it still has all the problems of any other regex-based solution. > If you shift the code right or left, it breaks (due to the \s{8}) and > you're back to counting whitespace again. Y'know, I pointed out before why I think this is a superfluous issue. You have to either change your regexp, or change the indentation of your here docs terminator when you move your code around. And counting whitespace is not so hard to justify breaking this: if ( $its_all_good ) { print <<EOF; Thank goodness this text is centered! I'd really hate for it to left-shift on me. EOF } This should print out the text as shown verbatim. If you want reformatting of any kind, that's what regex's are for. The above is far more flexible, and your problem already has several other solutions, which you have yourself noted. Plus how to address the whole can of worms with tabs -> spaces, 4 or 8, trailing too, blank line stripping? Blech. regex. > And as Glen pointed out, what about that leading newline? Handled by the regexp, actually (yep I tested it). > Can I scream now? Not yet, but I might! :-) -Nate
- Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace a... Ariel Scolnicov
- Re: RFC 111 (v3) Here Docs Terminators (Was Whitesp... Dave Storrs
- Re: RFC 111 (v3) Here Docs Terminators (Was Whitesp... Ariel Scolnicov
- Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace a... Michael G Schwern
- Drop here docs altogether? (was Re: RFC 111 (v3) Here Do... Nathan Wiger
- Re: Drop here docs altogether? (was Re: RFC 111 (v3... Peter Scott
- Re: Drop here docs altogether? (was Re: RFC 111 (v3... Bart Lateur
- Re: Drop here docs altogether? (was Re: RFC 111 (v3... Glenn Linderman
- Re: Drop here docs altogether? (was Re: RFC 111 (v3... Glenn Linderman
- Re: Drop here docs altogether? (was Re: RFC 111 (v3... Michael G Schwern
- Re: RFC 111 (v3) Here Docs Terminators (Was Whitesp... Nathan Wiger
- Re: RFC 111 (v3) Here Docs Terminators (Was Whitespace a... Glenn Linderman
- Re: RFC 111 (v3) Here Docs Terminators (Was Whitesp... Michael G Schwern
- Re: RFC 111 (v3) Here Docs Terminators (Was Whitesp... Michael G Schwern
- Re: RFC 111 (v3) Here Docs Terminators (Was Whitesp... Nathan Wiger
- Re: RFC 111 (v3) Here Docs Terminators (Was Whitesp... Richard Proctor
- Re: RFC 111 (v3) Here Docs Terminators (Was Whitesp... Michael G Schwern
- Re: RFC 111 (v3) Here Docs Terminators (Was Whitesp... Richard Proctor
- Re: RFC 111 (v3) Here Docs Terminators (Was Whitesp... Glenn Linderman
- Re: RFC 111 (v3) Here Docs Terminators (Was Whitesp... Nathan Wiger
- Re: RFC 111 (v3) Here Docs Terminators (Was Whitesp... Glenn Linderman