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

IIRC, you have to un-indent the ending ENDHEADER tag so there's no whitespace before or after it.
  • Comment on Re: Can't find string terminator "ENDHEADER" anywhere before EOF

Replies are listed 'Best First'.
Re^2: Can't find string terminator "ENDHEADER" anywhere before EOF
by Anonymous Monk on Mar 09, 2010 at 17:52 UTC
    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
      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.
      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."