On Fri, 8 Feb 2008 18:17:28 -0500
Xavier Noria <fxn / hashref.com> wrote:

> On Feb 9, 2008, at 12:09 AM, Roger Pack wrote:
> 
> > Question: is it possible to create an array of here documents?
> > a = [<<END
> > some stuff
> > more stuff
> > END,
> > <<END
> > even more
> > END
> > ]
> >
> >
> > ?
> 
> Yup:
> 
> a = [<<FOO, <<BAR]
> some stuff
> more stuff
> FOO
> even more
> BAR
> 

Is there any reason you wouldn't set up the heredocs first and then add
them to an array?

HD1 = <<ENDHD1
This is a heredoc.
The first of 2.
ENDHD1

HD2 = <<ENDHD2
This is the second heredoc.
ie the last.
ENDHD2

a=[HD1,HD2]


cheers,

-- 
Mark