in reply to Re: Why do here-docs have to end with a newline, not EOF?
in thread Why do here-docs have to end with a newline, not EOF?

An even briefer glance at the code suggests that commenting out the newline assignment (I presume following the token size test) would allow any terminal token starting with the heredoc start token string, but possibly including any amount of garbage following it, would match. The trailing new line is a little like an implicit \b.


Perl is environmentally friendly - it saves trees
  • Comment on Re^2: Why do here-docs have to end with a newline, not EOF?