I've been trying to use Here-documents, but it's not working. What might be wrong? Am I missing something obvious?
This is the entire contents of the file I'm trying to run (there are no spaces, or tabs anywhere):
print<<EOF;
text
EOF
I'm running it by saving it in Notepad or Notepad++ as a file called 3.pl.
Then by going into the DOS window under Windows 7
and typing perl 3.pl
I get this message:
Can't find string terminator "EOF" anywhere before EOF at 3.pl line 1.
Make sure your file has an empty line at the end. This should be four lines:
print<<EOF;
text
EOF
#or a comment here works too ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With