T
Trudge
This is driving me crazy. I've been programming Perl for several years,
and love the 'here' document capability. I know how it works, and use
it in almost every script I write. I've done the Google group search
and read most of the postings, but no answers to my particular problem.
My development environment is Windows 2000 Pro, running Apache (1.3.29
and 2.0.52) and ActiveState Perl 5.x. I've been developing under this
scenario for a couple of years. I use TextPad as my editor. I haven't
made any changes to anything in the environment. Most of my scripts end
up on *nix boxes, and they all work just fine there.
Lately I noticed this on my home machine when running a test script:
Can't find string terminator "EndOfText" anywhere before EOF at test.pl
line 12 (#1)
(F) Perl strings can stretch over multiple lines. This message
means
that the closing delimiter was omitted. Because bracketed quotes
count
nesting levels, the following is missing its final parenthesis:
print q(The character '(' starts a side comment.);
If you're getting this error from a here-document, you may have
included
unseen whitespace before or after your closing tag. A good
programmer's
editor will have a way to help you find these characters.
Uncaught exception from user code:
Can't find string terminator "EndOfText" anywhere before EOF at
test.pl line 12.
at test.pl line 12
Here's the code:
#! /usr/bin/perl -w
BEGIN
{
open (STDERR,">>$0-err.txt");
print STDERR "\n",scalar localtime,"\n";
}
use diagnostics;
print "Content-type:text/plain\n\n";
print <<EndOfText;
Why doesn't this work?
EndOfText
I've checked this for syntax umpteen times and can't find anything
wrong. There is a hard-return after 'EndOfText' and it is at the left
margin. I run it through the server in a browser window and from the
command line, but still get the same result.
It's like an EOF character is buried in there somewhere. Which leads me
to wonder if TextPad has been corrupted to save files in a funky format
or something.
Anyone that has any ideas on this would you please respond either here
(for the rest of the group) and/or to my personal email.
Thanks.
--
and love the 'here' document capability. I know how it works, and use
it in almost every script I write. I've done the Google group search
and read most of the postings, but no answers to my particular problem.
My development environment is Windows 2000 Pro, running Apache (1.3.29
and 2.0.52) and ActiveState Perl 5.x. I've been developing under this
scenario for a couple of years. I use TextPad as my editor. I haven't
made any changes to anything in the environment. Most of my scripts end
up on *nix boxes, and they all work just fine there.
Lately I noticed this on my home machine when running a test script:
Can't find string terminator "EndOfText" anywhere before EOF at test.pl
line 12 (#1)
(F) Perl strings can stretch over multiple lines. This message
means
that the closing delimiter was omitted. Because bracketed quotes
count
nesting levels, the following is missing its final parenthesis:
print q(The character '(' starts a side comment.);
If you're getting this error from a here-document, you may have
included
unseen whitespace before or after your closing tag. A good
programmer's
editor will have a way to help you find these characters.
Uncaught exception from user code:
Can't find string terminator "EndOfText" anywhere before EOF at
test.pl line 12.
at test.pl line 12
Here's the code:
#! /usr/bin/perl -w
BEGIN
{
open (STDERR,">>$0-err.txt");
print STDERR "\n",scalar localtime,"\n";
}
use diagnostics;
print "Content-type:text/plain\n\n";
print <<EndOfText;
Why doesn't this work?
EndOfText
I've checked this for syntax umpteen times and can't find anything
wrong. There is a hard-return after 'EndOfText' and it is at the left
margin. I run it through the server in a browser window and from the
command line, but still get the same result.
It's like an EOF character is buried in there somewhere. Which leads me
to wonder if TextPad has been corrupted to save files in a funky format
or something.
Anyone that has any ideas on this would you please respond either here
(for the rest of the group) and/or to my personal email.
Thanks.
--