in reply to [Solved]: Can we use print <<HTML; twice in same file?

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on Re: Can we use print <<HTML; twice in same file?

Replies are listed 'Best First'.
Re^2: Can we use print <<HTML; twice in same file?
by fishmonger (Chaplain) on Aug 25, 2015 at 15:10 UTC

    Sorry but that is incorrect. You can have multiple heredocs with the same tag name as long as they are started and terminated correctly. In the OP's case the first one was not being terminated correctly.

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re^2: Can we use print <<HTML; twice in same file?
by Tux (Canon) on Aug 25, 2015 at 15:53 UTC

    HUMBUG! Did you try that?

    You can even use the same tag more than once on the same line:

    print <<"HTML", <<"HEAD", <<"BODY", <<"HTML"; <html> HTML <head><title>Test</title></head> HEAD <body></body> BODY </html> HTML

    <html> <head><title>Test</title></head> <body></body> </html>

    Enjoy, Have FUN! H.Merijn