in reply to Re: Can't find string terminator "ENDHEADER" anywhere before EOF
in thread Can't find string terminator "ENDHEADER" anywhere before EOF

That Perl says: "Can't find string terminator "" anywhere before EOF" instead of: "Help! There's some whitespace before the second one" is: TRULY PATHETIC
  • Comment on Re^2: Can't find string terminator "ENDHEADER" anywhere before EOF

Replies are listed 'Best First'.
Re^3: Can't find string terminator "ENDHEADER" anywhere before EOF
by ikegami (Patriarch) on Mar 09, 2010 at 19:31 UTC
    The behaviour can't be changed because of backwards compatibility. The best that can be done is too clearly document the trap, and that has been done. Perl 6, not constrained by backwards compatibility, does allow whitespace before the token.
Re^3: Can't find string terminator "ENDHEADER" anywhere before EOF
by Anonymous Monk on Mar 09, 2010 at 18:05 UTC
    to be fair, if you place: use diagnostics; at the start of the code it will say: "If you're getting this error from a here-document, you may have included whitespace before or after your closing tag. A good programmer's editor will have a way to help you find these errors."