Nathan Wiger wrote:
>Actually, to me this thread underscores how broken here docs are
>themselves. We already have q//, qq//, and qx// which duplicate their
>functions far more flexibly. Question: Do we really need here docs?

Yes.

Try generating lots of HTML, Javascript, Postscript, or other
languages without here docs. Example:

    print <<CODE_SNIPPET;
// this is a javascript function
function valid(s) 
{
   ...
   if (var2 >= '"'))
   {
    // rest of code to be generated later.
CODE_SNIPPET

There's a chunk of code for which '', "", qq//, qq<>, qq{}, are all
inadequate. This kind of code happens A LOT in web programming.

I do not want to have to examine all of my generated strings to see
what quoting character I can use this time around, and I do not want
to risk breaking my program whenever I change the text in a code
snippet ("oops! I added a bracket. gotta change the quoting character!").

 ----------------------------------------------------------------------
 Eric J. Roode,  [EMAIL PROTECTED]           print  scalar  reverse  sort
 Senior Software Engineer                'tona ', 'reh', 'ekca', 'lre',
 Myxa Corporation                        '.r', 'h ', 'uj', 'p ', 'ts';

Reply via email to