All,
I have been viewing the documentation for CGI.pm in hopes to use the
radio_group function. According to the docs my code appears to be correct.
Here is a sample and the error, can someone please help? I am sure this is a
simple fix. Note - I am an absolute perl n00b with no programming
experience.
# Create New CGI Object
my $q = new CGI;
# print form
print $q->header,
$q->start_html,
$q->br,
$q->start_multipart_form,
$q->p("Select a promotion directory:"),
%label = ('hw'=>'..support_docs/HW',
'nw'=>'..support_docs/NW',
'sw'=>'..support_docs/SW',
'swmfis'=>'..support_docs/SW/MFIS',
'swunifi'=>'..support_docs/SW/Unifi',
'swwebcaaf'=>'../support_docs/SW/WEBCAAF_eforms');
$q->radio_group (
-name=> 'promdir',
-labels=>\%label,
-default=>'selected',
-linebreak=>'true'),
$q->br,
$q->submit('Promote'),
$q->end_form,
$q->end_html;
Error:
[Tue May 18 13:46:00 2004] promote.cgi: Execution of
/www/web/cgi-sec/merlin/promote.cgi aborted due to compilation errors.
[Tue May 18 13:46:01 2004] promote.cgi: Global symbol "%label" requires
explicit package name at /www/web/cgi-sec/merlin/promote.cgi line 36.
TIA,
John