[tpm] Bizarre bug or brain fade?
fulko.hew at gmail.com
Tue May 12 11:17:11 PDT 2009
On Tue, May 12, 2009 at 2:07 PM, <arocker at vex.net> wrote:
> A program containing a fairly large "here document" is on a machine I
> cannot access directly. (Somebody else has to run it for me.) The code was
> substantially copied from a program that runs successfully there, but it
> crashes with a complaint that the terminal string was not found before EOF
> on input. (I can't quote Perl versions today.)
> I've tried the usual things to ensure that there are no invisible
> characters lurking on the line, &c., to no avail. The whole program cannot
> be run on my machine, but when I extracted the relevant portion for
> autopsy, it worked.
> This dialogue http://tinyurl.com/ov69dt seems to deal with a similar case,
> but it's old enough that I would expect it to have been fixed by now. Has
> anyone seen anything similar?
I read yr link, and just tried it out on an older perl 5.004_04
and it fails (under warning) with:
Can't find string terminator "EOF" anywhere before EOF at t.1 line 1
What I created was:
but I had to use 'dd' to hack off the trailing newline
$ hd t.1
0000 70 72 69 6e 74 20 3c 3c 45 4f 46 0a 68 65 6c 6c print <<EOF.hell
0010 6f 0a 45 4f 46 o.EOF
Without the trailing 0x0a, it bitches... with the trailing 0x0a, all is OK
So I just tried
echo "" >> t.
to fix the file, and that worked.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the toronto-pm