in reply to Passing scalars to CGI module
But back to your problem: suppose you did this:
...where $sample{'login'}[2] is your CGI method and $sample{'login'}[3] is the fieldname. Or better yet:%sample = ( 'login' =>["Login", 75, 'textfield', 'login'], 'last' =>["Last Name", 75, 'textfield', 'last'], 'first' =>["First Name", 70, 'textfield', 'first'] );
That way if you wanted to access the default param of 'last' all you'd have to do is:%sample= ( 'login' =>{name=>"Login", width=>75, method=> 'textfield', field=>'log +in'}, 'last' =>{name=>"Last Name", width=> 75, method=>'textfield', field=>' +last'], 'first' =>{name=>"First Name", width=>70, method=>'textfield', field=> +'first'} );
or somesuch.print $q->$sample{'last'}{'method'} ($sample{'last'}{'field'});
Gary Blackburn
Trained Killer
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Passing scalars to CGI module
by filmo (Scribe) on Apr 14, 2001 at 03:26 UTC |