From: Florian Gilcher Date: 2012-02-01T16:31:38+09:00 Subject: Re: why we need heredoc On Feb 1, 2012, at 1:22 AM, Josh Cheek wrote: > 2012/1/31 Matthias Wächter > >> On 31.01.2012 15:50, Josh Cheek wrote: >> >>> It's great if you want to copy and paste some text. The text might have >>> single and double quotes in it, but with a heredoc that doesn't matter. >>> Otherwise, you'd have to go through your document, find all the quotes, >>> and >>> escape them. >>> >> >> take care of “some text” here. If the text contains your stop word, you’re >> gonna have to escape that as well. Or choose a different stop word then. >> >> > In practice, I've never had that happen, but in any situation where it was > likely, I'd probably have thrown it under __END__ and read it in, or put it > in its own file. First of all, as this is a literal, this would be a parse error, so it doesn't matter that much. Also, the stop word has to be at the beginning of a line. <<-HERE test HERE HERE => "test HERE\n"