in reply to Unexpected results when removing a HERE-DOC "ending" newline, with map and/or s/// depending on context.

But here-docs are so ugly for so many reasons. Not being able to omit the final newline is just one. They also aren't very flexible at interpolating in the middle. They break if you reindent code. Worst of all, they break in the face of invisible whitespace (trailing whitespace is not even indirectly visible in most environments).

Use qq<>.

- tye        

  • Comment on Re: Unexpected results when removing a HERE-DOC "ending" newline, with map and/or s/// depending on context. (qq++)

Replies are listed 'Best First'.
Re^2: Unexpected results when removing a HERE-DOC "ending" newline, with map and/or s/// depending on context. (qq++)
by olivierp (Hermit) on Dec 09, 2004 at 20:37 UTC
    Thanks. I forgot most of the q.// operators.
    I'll see if I can get some "strange" behaviour out of it :)

    --
    Olivier