From: Robert Klemme Date: 2008-02-09T20:09:55+09:00 Subject: Re: array of here documents On 09.02.2008 12:04, Mark Woodward wrote: > On Fri, 8 Feb 2008 18:17:28 -0500 > Xavier Noria wrote: > >> On Feb 9, 2008, at 12:09 AM, Roger Pack wrote: >> >>> Question: is it possible to create an array of here documents? >>> a = [<>> some stuff >>> more stuff >>> END, >>> <>> even more >>> END >>> ] >>> >>> >>> ? >> Yup: >> >> a = [<> 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 = < This is a heredoc. > The first of 2. > ENDHD1 > > HD2 = < This is the second heredoc. > ie the last. > ENDHD2 > > a=[HD1,HD2] Waste of constants / variables. robert