in reply to Re^2: Can't include a HEREDOC within RHS of a Regex
in thread Can't include a HEREDOC within RHS of a Regex

...and that syntax applied to the simpler version:

While your code is quite revealing, your explanation leaves to be desired. You seem to be saying the following snippets are equivalent:

print "a", <<"END_OF_STR", "c"; b END_OF_STR
print "a", <<"END_OF_STR", "c"; b END_OF_STR

They're not.