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."