Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Why do here-docs have to end with a newline, not EOF?

by GrandFather (Sage)
on May 12, 2008 at 00:56 UTC ( #686012=note: print w/replies, xml ) Need Help??


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?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://686012]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (2)
As of 2020-08-13 00:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which rocket would you take to Mars?










    Results (68 votes). Check out past polls.

    Notices?