in reply to Re: best way to print paragraphs of text
in thread best way to print paragraphs of text

Further to CountZero's post:

A here-doc is, to my way of thinking, intended to deal with multiple lines having embedded newlines. The examples given in the OP use a single, very long line with no newlines. If this is, indeed, the type of string keiusui intends to print, then, as CountZero says, just print it and forget about here-docs.

If one intends to print a string consisting of several lines (i.e., with embedded newlines) using a here-doc, then you are stuck with an approach such as those outlined by desemondo.

  • Comment on Re^2: best way to print paragraphs of text