Tom Christiansen wrote:
> 
> I still like this solution prototype:
> 
> sub comment($) { } 
> 
> comment <<"END OF FIRST COMMENT";
>     asdf
>     asdf
>     asdf
>     asdf
>     asdf
> END OF FIRST COMMENT

So do I.  Actually, here-docs can be a bit unwieldy, what with the
requirement for the end tag to begin in column 0.  die fortran die!

Proposal: here-docs specified with regexes, and no special
meaning for newlines.

  comment <</EOC/;  this is an arbitrary comment.  EOC

Or:

  comment <</^\s*EOC/;  this is an arbitrary comment.
    more commentary text.  EOC doesn't stop it here, but here:
      EOC

-- 
John Porter

Reply via email to