my @dist = qw(local global); my @robo = qw(index noindex follow nofollow); my @lang = qw(EN EN-GB EN-US ES ES-ES FR IT JA KO DE­); my @rate = qw(kids general mature restricted); my %name = ( author => [ sub{textfield(@_)} , {-size=>40} ], distributor => [ sub{textfield(@_)} , {-size=>40} ], copyright => [ sub{textfield(@_)} , {-size=>40} ], abstract => [ sub{textfield(@_)} , {-size=>40} ], keywords => [ sub{textarea(@_)} , {-rows=>5,-columns=>30} ], description => [ sub{textfield(@_)} , {-rows=>5,-columns=>30} ], distribution => [ sub{popup_menu(@_)} , {-values=>['',@dist]} ], robots => [ sub{popup_menu(@_)} , {-values=>['',@robo]} ], language => [ sub{popup_menu(@_)} , {-values=>['',@lang]} ], rating => [ sub{popup_menu(@_)} , {-values=>['',@rate]} ], ); print header, start_html('Meta Tag Generator'), start_form, table( map { Tr( td(ucfirst $_ . ': '), td $name{$_}[0]->( -name=>$_, %{$name{$_}[1]} ) ) } keys %name ), submit('submit'), end_form, ; if (param('submit')) { for (keys %name) { my $param = param($_); next unless $param; print escapeHTML(meta{name=>$_,content=>$param}),br; } } print end_html;