On 27 Aug 2000 19:23:51 -, Perl6 RFC Librarian wrote:
Further it should ignore any whitespace (and comments) that follow the
terminator.
All of these should work:
print EOL ;
EOL # this is the end of the here doc
But currently, I like using:
print "#EOT#2";
blah
Bart Lateur [EMAIL PROTECTED] writes:
On 27 Aug 2000 19:23:51 -, Perl6 RFC Librarian wrote:
Further it should ignore any whitespace (and comments) that follow the
terminator.
All of these should work:
print EOL ;
EOL # this is the end of the here doc
But
Richard Proctor proposed:
All of these should work:
print EOL;
EOL
print EOL;
EOL
print EOL ;
EOL # this is the end of the here doc
People may throw rocks at me for this, but I'd like to suggest that
not only is a comment allowed on the terminator line,
On Mon, 28 Aug 2000 10:38:42 -0400 (EDT), Eric Roode wrote:
People may throw rocks at me for this, but I'd like to suggest that
not only is a comment allowed on the terminator line, but a semicolon
also be allowed. Vis:
print EOL;
EOL; # This should work, too
Let me throw the first
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
On Mon, 28 Aug 2000 08:46:25 -0700, Nathan Wiger wrote:
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
On Mon 28 Aug, Eric Roode wrote:
Richard Proctor proposed:
All of these should work:
print EOL;
EOL
print EOL;
EOL
print EOL ;
EOL # this is the end of the here doc
People may throw rocks at me for this, but I'd like to suggest that
not only
On Mon 28 Aug, Bart Lateur wrote:
On Mon, 28 Aug 2000 10:38:42 -0400 (EDT), Eric Roode wrote:
People may throw rocks at me for this, but I'd like to suggest that
not only is a comment allowed on the terminator line, but a semicolon
also be allowed. Vis:
print EOL;
EOL; # This
Next you'll propose that
print EOL;
blah
EOL; print "OK!\n";
should work too, and print "OK!\n" as well.
Yes why not, though it might be bad style.
Because it gains you nothing, and loses much.
--tom
This and other RFCs are available on the web at
http://dev.perl.org/rfc/
=head1 TITLE
Here Docs Terminators (Was Whitespace and Here Docs)
=head1 VERSION
Maintainer: Richard Proctor [EMAIL PROTECTED]
Date: 16 Aug 2000
Last Modified: 27 Aug 2000
Mailing List:
10 matches
Mail list logo