perlpal has asked for the wisdom of the Perl Monks concerning the following question:
I have used the Here document in part of my function to print multiple statements.When i execute the here document part only as a stand-alone script,it prints the expected output.However,when i use the here document within a function , I get the following error :
"Can't find string terminator "END" anywhere before EOF at generateTAFLib.pl line 110."
The codelet is
sub test(){ #variable declarations #some code print <<'END'; output END #some code }
I checked the perfaq and verified that the code conforms to the here document requirements.Can't figure out why i get this error.
The output spans a lot of lines and so have not mentioned it here.
Thanks in advance.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: HERE document string terminator error
by 1Nf3 (Pilgrim) on Jul 10, 2009 at 08:01 UTC | |
by perlpal (Scribe) on Jul 13, 2009 at 05:27 UTC | |
|
Re: HERE document string terminator error
by moritz (Cardinal) on Jul 10, 2009 at 07:49 UTC | |
|
Re: HERE document string terminator error
by pKai (Priest) on Jul 10, 2009 at 08:27 UTC |