# file test.pl
use HTML::Template;
use strict;
use warnings;
my $template = HTML::Template->new(filename => 'test.tmpl');
# params
$template->param(tag1_common => 'XXX');
$template->param(tag2_common => 'YYY');
$template->param(tag3_common => 'ZZZ');
print $template->output();
# file test.tmpl
# output
XXX
YYY
ZZZ