in reply to Using hash values as CGI query types

CGI doesn't have the method (start_td etc) that you're using
You need to pass in each value to methods such as td, Tr etc:
#!/usr/bin/perl use warnings; use strict; use CGI qw(:standard); my $foo = "bar"; my $bar = "baz"; #i've passed Tr an _array reference_ print Tr([td($foo), td($bar)]), "\n";
You might also want to check out something like HTML::Template or Template::Toolkit
Update: after your update:
print Tr( [ td($req.$key), td(input(-type=>$input_html{$key}, -name=>$key)) ] );
Should do what you want (untested). However, writing this makes me think that there's a Better Way of doing what you're trying to do.

davis
It wasn't easy to juggle a pregnant wife and a troubled child, but somehow I managed to fit in eight hours of TV a day.

Replies are listed 'Best First'.
Re^2: Using hash values as CGI query types
by shenme (Priest) on Jan 28, 2005 at 12:16 UTC
    In the CGI.pm doc, check under section "SPECIAL FORMS FOR IMPORTING HTML-TAG FUNCTIONS" $query->start_td works fine, though you are right that using a bare start_td won't, requiring you to mention the need in the use, ala
    use CGI qw( :standard *td );
      Didn't know that. Well, you learn something new every time you remember something you didn't know before :)

      davis
      It wasn't easy to juggle a pregnant wife and a troubled child, but somehow I managed to fit in eight hours of TV a day.