On Wed, Aug 16, 2000 at 08:22:16PM -0400, Chaim Frenkel wrote:
> >>>>> "MF" == Michael Fowler <[EMAIL PROTECTED]> writes:
>
> MF> So what's insufficient about:
>
> MF> print <<" EOF";
> MF> Stuff
> MF> More stuff
> MF> Even more stuff
> MF> EOF
>
>
> Counting spaces, why make the programer work. Are those tabs or spaces?
I would hardly consider counting spaces work, it's fairly typical for the
kind of tabbing I use. If I used actual tabs, this would be a total
non-issue.
> And it doesn't strip the leading whitespace.
The RFC doesn't mention that the string will be stripped of leading
whitespace, at least not explicitly. It mentions "it effectively does
s/^\s*// before processing each following line", but the phrase shortly
before that, it "will ignore all leading white space on each line until the
end terminator is found" implies that it simply ignores leading whitespace
until if finds the EOF.
If it strips whitespace I would be more for it. If we can do some magic to
dictate what the leading characters to be stripped are I'd say we have a
winner here.
(Pardon the HTML, but it makes things more relevant.)
print <<EOF =~ s/^ {8}//g;
<HTML>
<HEAD><TITLE>Foo</TITLE></HEAD>
<BODY>
Bar
</BODY>
</HTML>
EOF
This would still produce nicely-formatted HTML, whereas stripping all
whitespace wouldn't.
Michael
--
Administrator www.shoebox.net
Programmer, System Administrator www.gallanttech.com
--