Bart Lateur wrote:
>
> Next you'll propose that
> 
>         print <<EOL;
>         blah
>         EOL; print "OK!\n";
> 
> should work too, and print "OK!\n" as well.

Why not?! This seems like a good thing. ;, #, or \n are all valid
end-of-lines for here string delimiters. Sounds easy enough, and
consistent.

> OTOH, what about this...
> 
>         print <<EOL
>         blah
>         EOL;
> 
> which makes this a full blown statement (note the missing semicolon in
> the first line)...

No it doesn't!

perl -e '
   print <<EOF
   Hello world!
EOF;
'
Can't find string terminator "EOF" anywhere before EOF at -e line 2.

Even Perl 5 is smart enough to DWIM here. Granted, sometimes this
doesn't work, but then it's just a Perl 6 syntax error that's identical
to the current Perl 5 syntax error.

-Nate

Reply via email to