in reply to popup_menu CGI.pm problems
%menu_values = {'eenie'=>'one', 'meenie'=>'two', 'minie'=>'three'};
You have the wrong kind of brackets in that assignment. Hashes are initialised from lists, so you should have ( ... ) (round brackets), not { ... } (curly brackets).
If you had use warnings in your code, then you would have seen the error "Reference found where even-sized list expected" - which might have been helpful to you.
Oh, and then you need to pass a _reference_ to the hash into the function.
print $CGI->popup_menu(-name => 'menu_name', -values => \%menu_values);
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
|
|---|