Talk:Here document

From Wikipedia, the free encyclopedia

Does anybody know - is it pronounced "hear dok" or "heh red oc" (sorry for bad attempts at spelling phonetically!) 213.253.35.7 13:08, 20 September 2006 (UTC)

While I haven't heard it said often, it's always been "hear dok" (two syllables), presumably because it's a contraction of "here document". Mairi 17:10, 20 September 2006 (UTC)

Contents

[edit] todo ;; add interpolation

add content on meaning of interpolation drefty.mac 04:05, 27 October 2006 (UTC)

[edit] Back to the future!

I really like the back to the future example for windows power shell (whoever did that). It's funny and very creative. Unfortunately, it's also quite long. I hate to ask, but can you please cut it down substantially? At least so it is at least close to the size of the other examples. Thanks! dr.ef.tymac 19:48, 24 November 2006 (UTC)

Never mind about shortening it, in reconsideration, the perl example is long also. But still, a more straightfoward example seems appropriate. It just seems like a bit much to demonstrate the difference between the two output results. dr.ef.tymac 19:51, 24 November 2006 (UTC)

[edit] "Here" ??

What does the word "Here" refer to? or what's its etymology? Dofstead 17:25, 6 March 2007 (UTC)

Probably here as in "a complete document right here". As opposed to theredoc (just found this myself: [1]). 193.143.216.169 11:54, 11 June 2007 (UTC)

[edit] Too wide definition

The article defines "here" documents as convenient multi-line string literals, and gives examples including Python's triple-quoted strings. I am almost sure this is incorrect. In Bourne shell, Perl and I guess a few more, the essential feature of a here document is that it isn't a string literal! It is an input stream, like a temporary file containing that string. It's indented to be fed as standard input to some external command. The tr(1) example in the article is typical. JöG (talk) 11:01, 16 February 2008 (UTC)

...and I guess that in PHP everything is heredoc by default, until you introduce any code with "php" tags. --Kubanczyk (talk) 22:37, 29 April 2008 (UTC)