use strict;
use warnings;
use CGI qw(param header);
use HTML::Template;
my @entry = (
[qw(one first)], [qw(two second)], [qw(three third)],
[qw(four fourth)], [qw(five fifth)],
[qw(six sixth)], [qw(seven seventh)], [qw(eight eighth)],
[qw(nine ninth)], [qw(ten tenth)],
);
my $tmpl = HTML::Template->new(filehandle => \*DATA);
$tmpl->param(
result => [map {which => $entry[$_][1]}, param 'sel'],
checkbox => [
{ row => [map {label => $entry[$_][0], value => $_}, 0..4] },
{ row => [map {label => $entry[$_][0], value => $_}, 5..9] },
],
);
print header,$tmpl->output;
__DATA__