in reply to String terminator problems.

The only time I have personally seen a message like that is when my terminator didn't start in column one. While this code does seem to have the terminator starting in column one, does the actual code you are running?

The other thoughts I had are:

I seem to have examples of code that have and don't have the bullet items above, and they all seem to work. That leads me back to the original positioning thought...

D a d d i o

Replies are listed 'Best First'.
Re: (Daddio) Re: hello
by chromatic (Archbishop) on Jun 21, 2001 at 05:21 UTC
    Careful, that's not quite accurate!

    The single quotes force a non-interpolative context, just like single quotes around a string. By default, here documents act like double quoted strings. His construct is valid.

    Similarly, you can only get away without the semicolon in a place where a statement doesn't need a closing semicolon -- at the end of a block or the end of a file. In this case, it would work if the original poster posted his complete program.

    My guess is that adding a newline or something after the terminator would fix it. Perhaps his editor doesn't add an EOF? He could also use exit or __END__.

      Thanks, chromatic, for explaining those points a bit. I looked through code I have (both mine and others) and was completely unsure about (1) when to single/double quote and (2) use the semi-colon. I'm still learning, too, and thought I would point out that I have seen it done both ways (missing, of course, the reason why). Thanks again for clarifying.

      D a d d i o