On Fri, 26 Jan 2001, Dale Phillips wrote:

> does ruby have the concept of 
> here documents like shell and perl?
> 
> #!/bin/perl
> $time=2001012500000
> print << STUFF
> 
> a bunch of text 
> put here and and completed
> at $time.
> 
> STUFF


Yes.  

#!/bin/ruby -w
time = 2001001250000
print <<STUFF

a bunch of text
put here and completed at #{time}

STUFF

and variants on that (such as "print <<-STUFF", where STUFF doesn't have to
be at the start of its line).


David

-- 
David Alan Black
home: dblack / candle.superlink.net
work: blackdav / shu.edu
Web:  http://pirate.shu.edu/~blackdav