Meiguoren
Technical User
- Jun 16, 2008
- 4
Hello everyone,
I'm learning Perl via Mike Gossland's tutorial at The tutorial presents "here documents," apparently a holdover from UNIX that offers equivalent functionality to the explicit quoting operator, qq{}. Mike gives a nice example of how the operator works:
The problem: it doesn't work! I'm using the most recent version of Perl 5, and I always get an error like "can't find string terminator 'EOF' anywhere before EOF at line 1."
My only guess is that support for here documents has been deprecated. Any suggestions? Thanks!
I'm learning Perl via Mike Gossland's tutorial at The tutorial presents "here documents," apparently a holdover from UNIX that offers equivalent functionality to the explicit quoting operator, qq{}. Mike gives a nice example of how the operator works:
Code:
print <<EOF;
Content-Type: text/html
<HTML>
<HEAD>
<TITLE>Hello World</TITLE>
</HEAD>
<BODY>
<H4>Hello World</H4>
<P>
Your IP Address is $ENV{REMOTE_ADDR}
<P>
<H5>Have a "nice" day</H5>
<p>Name:<input type="text" size="20" name="txt_name" value="name">
</BODY>
</HTML>
EOF
The problem: it doesn't work! I'm using the most recent version of Perl 5, and I always get an error like "can't find string terminator 'EOF' anywhere before EOF at line 1."
My only guess is that support for here documents has been deprecated. Any suggestions? Thanks!