Try changing your code so that your final HELLO occurs at the beginning of a line: print <<HELLO; hi HELLO Also note that there will be a tab in that (presuming you used a tab and not a few spaces to indent the "in", so what you have is more equivalent to print "\tHi\n"; than print "Hi\n". -David On Sat, 22 Feb 1997, Robert Pyle wrote: > I've been reading Randal Schwartz's Unix Review column no. 12, which is > about "here documents". > > Here's a short script (saved in file t.pl): > > #! perl -w > print <<HELLO; > hi > HELLO > > Seems like this should be equivalent to > > #! perl -w > print "hi\n"; > > but when I try to run it, MacPerl 5.1.3r2 tells me > > # Can't find string terminator "HELLO" anywhere before EOF. > File 'develop:Mac_Perl:mycode:t.pl'; Line 2 > > Is there some (good) reason this doesn't work on a Mac? > > Thanks for any insight. > > Bob Pyle, Cambridge, MA, USA > > > > > >