tags:

views:

67

answers:

1

I need to create HTML pop-up menu using Perl. Can anyone help me?

+2  A: 

Use the following code:

#!/usr/bin/perl 

use CGI qw/:standard/; 

print header, 
    start_html('Favorite Food'),
    start_form, "What's your favorite Food? ", 
    popup_menu(
        -name   => 'food',
        -values => [ qw( Juice Cake Chocolate Fruits ) ] 
        ), 
    submit,
    end_form, 
    end_html;