The minus sign -
after the <<
characters means you can indent the terminator.
So if the here document starts with @text = <<END
, you must terminate with END
in the beginning of the line. But with @text = <<-END
, you can put space before END
.
@text = <<-END
"Faith" is a fine invention
When Gentlemen can see
But Microscopes are prudent
In an Emergency.
(Emily Dickinson 1830-1886)
END
#^^^ Here white space