Q:

Write a Ruby program to print the following 'here document'

0

Write a Ruby program to print the following 'here document'.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Ruby Code:

puts(
<<-eos
Sample string :
a string that you "don't" have to escape
This
is a ....... multi-line
heredoc string --------> example
eos
)
Output:
Sample string :
a string that you "don't" have to escape
This
is a ....... multi-line
heredoc string --------> example

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now