Steve Simmons wrote:
>In all the straining at gnats over whitespace, filtering, etc, I have yet
>to see a single proposal that isn't accomplished by just using variables
>and manipulating them appropriately.  And it avoids all the problems with
>whitespace on the HERE word.

In many cases, I agree with you. But one thing I use Perl for -- A LOT
-- is generation of code in other languages; for example, javascript.

$snippet = <<CHUNK;
   function dummy(s)
   {
       var str = "Here's a string";
CHUNK
     # rest of javascript to be generated later
     
That's a contrived, but not far-fetched, example where single quote,
double quote, and qq{} won't work. Of course, one can always come up
with other qq variants, but having to remember which qq variant you're
using each time, and making sure that changes in the string don't 
break your quoting, is a major PITA.

No, here docs are an extremely useful part of the Perl language,
and often times, quoted strings just don't cut it.

 ----------------------------------------------------------------------
 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