#!/usr/bin/perl -w use CGI; use strict; use Template; $|++; my $file = "base.tmpl"; my @brokers = &get_brokers; my $template_data = { name => $name, # This would probably get passed to header.html brokers => \@brokers }; my $template = Template->new( { INCLUDE_PATH => '..\aliasdir1:..\aliasdir2', ABSOLUTE => 1 } ); $template->process( $file, $template_data ) or die $template->error(); sub get_brokers { # return an array of hash refs with keys being # qw/ ID name address city state zip phone / }