in reply to CGI PERL Help required

Consider using a template module such as HTML::Template to separate your Perl code and your HTML,JavaScript and CSS.