Published in: Ruby
URL: http://www.ruby-doc.org/docs/ruby-doc-bundle/Manual/man-1.4/syntax.html
Following a
print <<EOF The price is #{$Price}. EOF print <<"EOF"; # same as above The price is #{$Price}. EOF print <<`EOC` # execute commands echo hi there echo lo there EOC print <<"foo", <<"bar" # you can stack them I said foo. foo I said bar. bar myfunc(<<"THIS", 23, <<'THAT') Here's a line or two. THIS and here's another. THAT if need_define_foo eval <<-EOS # delimiters can be indented def foo print "foo\n" end EOS end
You need to login to post a comment.
