I really appreciate the advice you gave me. On Sat, 18 May 2013 09:18:52 +0100 timothy adigun <2teezp...@gmail.com> wrote:
> Hi Masayoshi, > > On Sat, May 18, 2013 at 12:51 AM, Masayoshi Fujimoto < > m.fujim...@rocketmail.com> wrote: > > > Hi > > Please help me. > > I can only see Hilary Duff. > > I can not see Taylor Momsen. > > I would like to use table for that. > > How should I do? > > > > ## Here is my script. > > #!/usr/bin/perl > > use Modern::Perl; > > use autodie; > > use CGI; > > > > > > my $q = CGI->new; > > > > my %label = ( > > celeb => 'Who do you fancy? : ', > > ); > > > > my %form = ( > > celeb => $q->radio_group(-name=>'celeb', > > -values=>['Hilary > > Duff','Taylor Momsen'], > > -default=>'Hilary Duff'), > > > > The line above gives a warning message: Odd number of elements in hash > assignment. > > You can re-write that like so: > > my $radio = $q->radio_group( > -name => 'celeb', > -values => [ 'Hilary Duff', 'Taylor Momsen' ], > -default => 'Hilary Duff'); > > my %form = ( > celeb => $radio, > submit => $q->submit, > reset => $q->reset, > ); > > > > say $q->header; > > say $q->start_html; > > say $q->start_form; > > say $q->table( > > $q->Tr([ > > $q->td([$label{celeb},$form{celeb}]), > > $q->td([$form{submit},$form{reset}]), > > ]) > > ); > > say $q->end_form; > > say $q->submit; > > say $q->end_form; > > say $q->end_html; > > > > > > -- > > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > > For additional commands, e-mail: beginners-h...@perl.org > > http://learn.perl.org/ > > > > > > > > > -- > Tim -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/