Reply on laptop in wilderness (no network) holydays me void this message by
other messages sent in my absence. Ignore if so.

On Thu, 17 Aug 2000 08:28:50 -0400 (EDT), Philip Newton
<[EMAIL PROTECTED]> wrote:
> On Tue, 15 Aug 2000, Michael Fowler wrote:
> 
> > So what's insufficient about:
> > 
> >     print <<"    EOF";
> >         Stuff
> >         More stuff
> >         Even more stuff
> >     EOF
> 
> Others have already mentioned the "have to count the number of spaces"
> argument. Another one that comes to mind is: assume the above is inside a
> 350-line block. Now I want to put an if($foo==$bar) { ... } around that
> block. To make the inner block look nice, I >% in vi -- shift the whole
> block over by one indent (a tab, two spaces, whatever). Presto, the thing
> stops working. I think the above method (having to add your own spaces, in
> the exact number required at the moment) is too fragile.

Shown case might suggest perl shifts the block between the here start and it's
terminator to the left by the width of the whitespace leading the terminator.
Wow, that would be useful. So,

    $s = <<<EOS
         This is the block
         eh, text, eh
             whatever
         EOS
         
would be equal to

    $s = "This is the block\n".
         "eh, text, eh\n".
         "    whatever\n";

Hmm, sounds like a good RFC this way.

-- 
H.Merijn Brand           Amsterdam Perl Mongers (http://www.amsterdam.pm.org/)
using perl5.005.03, 5.6.0 & 516 on HP-UX 10.20, HP-UX 11.00, AIX 4.2, AIX 4.3,
     DEC OSF/1 4.0 and WinNT 4.0 SP-6a,  often with Tk800.022 and/or DBD-Unify
ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/

Reply via email to