<br><br><div class="gmail_quote">On Tue, May 12, 2009 at 2:07 PM, <span dir="ltr"><<a href="mailto:arocker@vex.net">arocker@vex.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
A program containing a fairly large "here document" is on a machine I<br>
cannot access directly. (Somebody else has to run it for me.) The code was<br>
substantially copied from a program that runs successfully there, but it<br>
crashes with a complaint that the terminal string was not found before EOF<br>
on input. (I can't quote Perl versions today.)<br>
<br>
I've tried the usual things to ensure that there are no invisible<br>
characters lurking on the line, &c., to no avail. The whole program cannot<br>
be run on my machine, but when I extracted the relevant portion for<br>
autopsy, it worked.<br>
<br>
This dialogue <a href="http://tinyurl.com/ov69dt" target="_blank">http://tinyurl.com/ov69dt</a> seems to deal with a similar case,<br>
but it's old enough that I would expect it to have been fixed by now. Has<br>
anyone seen anything similar?<br>
</blockquote><div><br>I read yr link, and just tried it out on an older perl 5.004_04<br><br>and it fails (under warning) with:<br><br>Can't find string terminator "EOF" anywhere before EOF at t.1 line 1<br>
<br>What I created was:<br><br>print <<EOF<br>hello<br>EOF<br><br>but I had to use 'dd' to hack off the trailing newline<br><br>$ hd t.1<br>0000 70 72 69 6e 74 20 3c 3c 45 4f 46 0a 68 65 6c 6c print <<EOF.hell<br>
0010 6f 0a 45 4f 46 o.EOF<br>0015<br><br><br>Without the trailing 0x0a, it bitches... with the trailing 0x0a, all is OK<br><br>So I just tried<br><br>echo "" >> t.<br>
<br>to fix the file, and that worked.<br><br><br></div></div>