#!/usr/bin/perl -w use strict; use CGI qw(:standard); use HTML::Template; my $template = new HTML::Template (filehandle => \*DATA); my @radio_btns = radio_group(-name=>'type', -value=>[ 1 .. 12 ]); $template->param(type.($_ + 1) => $radio_btns[$_]) for (0 .. $#radio_btns); print $template->output; __DATA__