in reply to print qq once or many times

Does the "efficiency" really matter? If you have no immediate compelling reason to be concerned write it whichever way is most maintainable. Personally I'd probably use HTML::Template or some similar technology and remove the HTML from the code entirely.

True laziness is hard work