You got me!
I should perhaps explain that some time back I 'inherited' an application of about 50,000 lines of Perl which has all the HTML ( probably 60 or so pages ) all in the Perl as HERE doc's. It is a nightmare to maintain. In fact, it has become such a nightmare that I will shortly be starting a complete re-write where strict demarkation will be enforced, Perl for the programme, separate config system, HTML templates for structure and CSS docs for the styling.
Hopefully that way I can keep from being gotcha'd all the time as I am now.