use CGI; use strict; # ... some code open(FILE,'header.htm') and print ; # ... main program open(FILE,'footer.htm') and print ; # ... done