This is the basic principle of the web page formatter. If javascripts may appear in the content, the perl program can be modified to parse for the head tags in the input content file, then extract the scripts and insert them between the head tags of the output file. This is especially useful for rollover effects in the content. Switches for adding cetain text can also be done if an additional argument is taken by the perl program and use IF statements to decide when to insert the text. If you want to make your program more flexible, just use more arguments or variables.
Some useful variables are email address, divider graphic, and background image.
Build the program to suit your own purpose. Sections and directories It is also important to plan your web directory before writing the webpage formatter program . Of course, it is difficult and impractical to foresee every single page that will appear on the site. But at least plan the sections. For sections that will have multiple pages, I would recommend writing a separate formatter for it.