Well, you _can _ do this
    $var=<<"END    ";
       This is my variable's
       multiline text,
       complete tith tabs\t\t and extra newline\n\n, etc....
    END
^^^^
four spaces in the opening and closing quote.  I usually use qq{ }
depending on how much I care about whitespace formatting.  If I was
writing Perl code to generate Python code, I'd be in trouble (in more
than one way).


Paul wrote:
> As someone mentioned on the board (ever so briefly), here-documents
> like this one require that your "sentinel" string have no leading
> whitespace.
> 
> e.i., you may say
>    $var=<<END;
>       This is my variable's
>       multiline text,
>       complete tith tabs\t\t and extra newline\n\n, etc....
> END
> 
> but you *can't* say
>    $var=<<END;
>       blah
>    END
> 
> because here, END has space in front of it.
> In several shells you can put tabs in front of it if you say
>    print<<-END; # the dash says "let me use a leading tab"
>    blah
> <tab here>END

--
Salon Internet                          http://www.salon.com/
  Manager, Software and Systems "Livin' La Vida Unix!"
Ian Kallen <[EMAIL PROTECTED]> / AIM: iankallen / Fax: (415) 354-3326

Reply via email to