my add.cgi will be like this, my $component=$query->param('component'); my $ccc_id=$query->param('ccc_id'); my %data = ( ccc_id => $ccc_id, component_name => $component, add => \@tc_add_templ ); my $template = Template->new({ }); $template->process($file,\%data) || die $template->error(); ####
[% FOREACH element = add %] [% IF element.req == "all" %] #### @names=$query->param(); foreach $key (@names) { $val=$query->param("$key"); $hoh{$key}=$val; } #### #### if(ref eq " "){ pass the data to template ; } else { result data code; }