Popcorn Dave has asked for the wisdom of the Perl Monks concerning the following question:
I'm having an issue with here docs, and I'm sure it's something simple that I'm overlooking but it's annoying me. Given this code snippet from Merlyn's website(Jan 97 column):
use strict; my $stuff = join(":", <<END =~ /(.+)/g); hi there this\tis\ta\ttest of the best! END
and this code example from CGI::AJAX
sub Show_HTML { my $html = <<EOHTML; <HTML> <BODY> Enter something: <input type="text" name="val1" id="val1" onkeyup="exported_func( ['val1'], ['resultdiv'] );"> <br> <div id="resultdiv"></div> </BODY> </HTML> EOHTML
They're both failing with the error: Can't find string terminator anywhere before EOF, but obviously both string terminators are there.
Perl version:v5.8.8 built for MSWin32-x86-multi-thread (with 33 registered patches, see perl -V for more detail)
Am I just missing something obvious here?
Thanks in advance!
I would love to change the world, but they won't give me the source code
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Here docs throwing syntax error - can't find string terminator
by shmem (Chancellor) on May 29, 2007 at 22:17 UTC | |
by ikegami (Patriarch) on May 30, 2007 at 16:05 UTC | |
|
Re: Here docs throwing syntax error - can't find string terminator
by jdporter (Paladin) on May 29, 2007 at 23:45 UTC | |
|
Re: Here docs throwing syntax error - can't find string terminator
by FunkyMonk (Bishop) on May 29, 2007 at 22:21 UTC | |
|
Re: Here docs throwing syntax error - can't find string terminator
by jZed (Prior) on May 29, 2007 at 22:18 UTC | |
|
Re: Here docs throwing syntax error - can't find string terminator
by blazar (Canon) on May 29, 2007 at 22:55 UTC | |
by Popcorn Dave (Abbot) on May 29, 2007 at 23:06 UTC |