echo2.cgi

#!/usr/local/bin/perl
use strict;
use HTML::Template;
use CGI;

my $tmpl = HTML::Template->new( filename => "echo2.tmpl" );

my $q = CGI->new();
my @param;
for my $name ($q->param) {
  push @param, { NAME => $name, VALUE => $q->param($name) };
}
$tmpl->param( PARAM => \@param ) if (@param);

print "Content-Type: text/html\n\n", $tmpl->output();

__END__

echo2.cgi J