On Jan 11, 2008, at 8:05 AM, Todd Burch wrote: > Hi there. Why does the Here Document > require there to be no space after > the closing symbol? If I type "EOD " and press > enter, I get a syntax error. (See below.) If I type "EOD" with > an immediate carraige return, it works fine. > > Why so stringent? I would guess because it is simpler to implement and simpler to understand. If you made trailing white space allowed on the closing delimiter then you must define 'white space' and you have to explicitly ignore it when scanning for the end of the text. If you changed the rule to simply look for a line prefixed by the delimiter (so that white space wasn't an issue) then you would end up with strange things like: text <<EOT line 1 EOTX terminates the line It is just simpler and less ambiguous to look for a line that contains the delimiter and only the delimiter. Gary Wright