in reply to Passing scalars to CGI module

If you want to use $a as a method, you only store the method name in it, not the parameters.
$a = 'textfield'; $q->$a('lastname');

Replies are listed 'Best First'.
Re: Re: Passing scalars to CGI module
by filmo (Scribe) on Apr 14, 2001 at 02:26 UTC
    is it possible to do the following then:
    @a = ('textfield','lastname','Bob',20,15); $q->$a[0[(-name=>$a[1],-default=>$a[2],-size=>$a[3],-max=>$a[4]);
    or even better
    @a = ('textfield',qq|-name=>'lastname'|, qq|-default=>'Bob'|, etc.); $q->$a[0]($a[1],$a[2],$a[3], etc...)
    --
    Filmo the Klown