I have an application about a student data,and i am trying to make a radio-group which has options about gender of the student. But it shows me the following error: Undefined subroutine CGI::radio at C:/wamp/bin/apache/apache2.2.22/cgi-bin/modify.pl line 196
$cInput .= $q->div({-class => 'control-group'},
$q->label({-class => 'control-label', -for => 'gender'}, "Gender:"),
$q->div({class => 'controls'},
$q->span({class => 'span12'},
$q->label({-class => 'blue'},
$q->radio-group({-id => 'gender', -name => 'gender', -values => ['M','F'],-labels => \%labels, -default => $cGender, 'true'})))));
What may be the problem?
You are trying to call
$q->radio-group
but:-
is being treated as a subtraction operatorradio_group
(with an underscore)See the documentation