Hi, In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote:
> > Hi - > > I am grinding through =Programming Perl= and came to the section on Here > Documents in Chapter 2 (forgive me, I can't think of the term "Here > documents" without thinking that there must be a dog somewhere named > Documents). Coming from "[EMAIL PROTECTED] ;-) > Anyhoo, I tried typing some of the examples at the keyboard. They stick in > my memory better that way. I'm wondering why > > print << x 10; > The camels are coming! > > only seems to work if there is a blank line (e.g. a carriage return) after > the string to be printed. If I don't put that blank line in, I get the > error > > Can't find string terminator anywhere before EOF at ./perlcamel.pl line 3 > > (perlcamel.pl is what I called this). > > I'm sure this is a basic question, but the book does not seem anyway to > mention a need for a blank terminating line. >From perldoc perlop: If the terminating identifier is on the last line of the program, you must be sure there is a new line after it; otherwise, Perl will give the warn ing Can't find string terminator "END" anywhere before EOF.... I'm not familiar (haven't read Programming Perl, yet) with this form of the here-document ("self-terminating"?), but I think it's the same problem mentioned in the citation. -K -- Kevin Pfeiffer International University Bremen -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]