Dear all, I just try a small CGI script. Although it displays no problem on the webpage there are two small errors in the script. I wonder if anyone here can help me figure out. And here is the script:
#!c:/Perl/bin/perl.exe use warnings; use strict; use CGI; my $query_obj=CGI->new(); #creat webpage print $query_obj->header; print $query_obj->start_html('My First Webpage'); print $query_obj->start_form; print $query_obj->p; print "What is your name ",$query_obj->textfield(-name=>'text_field', -value=>''); print $query_obj->p; my @major=qw( English Biology Immunology ); print " What is your major ",$query_obj->popup_menu(-name=>'menu_name',-value=>[EMAIL PROTECTED]); print $query_obj->p,$query_obj->submit; print $query_obj->end_form; print $query_obj->end_html; #capture the data my $name=$query_obj->param('text_field'); print $query_obj->p,"This is your name $name", "\n\n"; #line31 print $query_obj->p; my $major=$query_obj->param('menu_name'); print "This is your major $major "; #line35 exit; And here is the information after running this script under window prompt: ........... </body> Use of uninitialized value in concatenation (.) or string at cgi_7.pl line 31. </html><p />This is your name Use of uninitialized value in concatenation (.) or string at cgi_7.pl line 35. Thanks, Li __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>