Here was
my CGI.pm solution (with less relevant details stripped out):
my @values = qw(
a b c d
);
my %labels = (
a => 'Friend',
b => 'Magazine (please specify:)',
c => 'Internet',
d => 'Other',
);
$labels{$_} = $cgi->escapeHTML($labels{$_}) for keys %labels;
$labels{b} .= $cgi->textfield(-name => 'magname');
print $cgi->start_form();
$cgi->autoEscape(0);
print $cgi->radio_group(-name => 'question',
-values => \@values,
-linebreak => 'true',
-labels => \%labels);
$cgi->autoEscape(1);
print $cgi->endform;
I didn't like having to turn off autoEscape() and explicitly escape the other entries, so I was looking for a cleaner solution -- but it looks like that's as good as it gets (with CGI.pm, at least).
Thanks
jeffa,
podmaster.
Impossible Robot