#21191 [Bgs]: Here Documents and EOF

From: Date: Thu, 26 Dec 2002 12:05:00 +0000
Subject: #21191 [Bgs]: Here Documents and EOF
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-28392@lists.php.net to get a copy of this message
ID: 21191 Updated by: sesser@php.net Reported By: neo_in_matrix@msn.com Status: Bogus Bug Type: *General Issues Operating System: Windows XP Pro/SP1 PHP Version: 4.2.3 New Comment: We do not fix perl bugs. Previous Comments: ------------------------------------------------------------------------ [2002-12-26 06:04:11] georg@php.net rofl! ------------------------------------------------------------------------ [2002-12-26 06:00:56] neo_in_matrix@msn.com #! c:/perl/bin/perl.exe -w # ######################### use strict; #print "Content-Type:text/plain\n\n"; print <<"END"; A B C DE F END^Z If you have the above simple script file you won't get it run! Instead, you will get error: Can't find string terminator "END" anywhere before EOF at C:\Perl\eg\test.pl line 9. Why? Note that the file ends immediately after the last word 'END'. There is NO new line after it! But, if you add a new line after 'END', the script runs well. That is: #! c:/perl/bin/perl.exe -w # ######################### use strict; #print "Content-Type:text/plain\n\n"; print <<"END"; A B C DE F END ^Z ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21191&edit=1

« previous php.bugs (#28392) next »