Reputation: 1032
While practicing I found that the following code is working fine on Linux but not on Windows
print<<EOF;
this is a paragraph
EOF
On Windows it says.
Can't find string terminator "EOF" anywhere before EOF at demo.pl.
Upvotes: 0
Views: 121
Reputation: 122493
Windows thinks the end of file is part of the terminating string EOF
, thus it doesn't follow the rule that The terminating string must appear by itself. You need to add a new line after the terminating string EOF
.
print<<EOF;
this is a paragraph
EOF
# a new line
Upvotes: 1