#!/usr/bin/perl use strict; use warnings; use CGI qw(:standard); use HTML::Template; my $cgi = new CGI; my $tmpl = new HTML::Template( path => [ '/path/to/' ], filename => menu_bar.tmpl, ); $tmpl->param( [ { option_name => 'Home', optopn_address => '/index.cgi', }, { option_name => 'About', option_address => '/about.cgi', }, { option_name => 'Contact', option_address => '/contact.cgi', }, ] ); print $cgi->header(); print $tmpl->output();