[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Here-Document problem



>I have been having some difficulty with the Perl "here-document"
>operator in MacPerl.  The following script works fine on my UNIX box:
>
>print(<<"MY_EOF");
>this is a test
>and so is this
>and so is that...
>MY_EOF
>
>But fails with the following warning on my Mac:
>
># Can't find string terminator "MY_EOF" anwhere before EOF.

try:

print <<MY_EOF;
this is a test
and so is this
and so is that...
MY_EOF

this works for me under macperl 4 and 5, and perl 4 and 5 on BSD Unix

i think your version would probably work if you used
"MY_EOF"
as the terminator (with the double quotes)

cheers

iain



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch