in reply to Re: Passing scalars to CGI module
in thread Passing scalars to CGI module

Okay, I understand your point about hash of hashes. So,...
%sample= ( 'login' => {name=>"Login", width=>75, method=> 'textfield', field=>'login', size=>'10', max=>'8' }, etc... );
Now, to generate the <INPUT TYPE="text" NAME="login" VALUE="" SIZE=10 MAXLENGTH=8> HTML code, I would do that by:
$q = new CGI; print $q->$sample{'login'}{'method'}->($sample{'login'}{'field'}, $sample{'login'}{'size'}, $sample{'login'}{'max'}); or do I need to do the following: print $q->$sample{'login'}{'method'}->(-name=>$sample{'login'}{'field' +}, -size=>$sample{'login'}{'size'}, -max=>$sample{'login'}{'max'});
Ultimately, I want to be able to do something like the following.
@report = ('last','first','phone','payment'); foreach (@report) { print qq|<tr><td width="$sample{$_}{'width'}">$sample{$_}{'name'}|; print $q->$sample{$_}{'method'}->(-name=>$sample{$_}{'field'}, -size=>$sample{$_}{'size'}, -max=>$sample{$_}{'max'}); print qq|</td></tr>|; }

--
Filmo the Klown