Look at the various template modules for perl, including but not limited to
Text::Template,
HTML::Template, and
Template (aka Template Toolkit 2). All of these allow you to develop skeleton pages for both static and dynamic pages for a consistent website look and add little overhead for dynamic page generation when used right.