in reply to Template::Toolkit: better way to generate variable names?
[% foo_1 = 'value1' foo_2 = 'value2' foo_3 = 'value3' foo_4 = 'value4' foo_5 = 'value5' %] [% FOREACH n = [ 1 .. 5 ] %] [% 'foo_' _ n %] is [% ${ "foo_$n" } %] [% END %]
Update: I misread the question. See geektron's reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Template::Toolkit: better way to generate variable names?
by geektron (Curate) on Aug 06, 2003 at 13:01 UTC | |
|
Re: Re: Template::Toolkit: better way to generate variable names?
by geektron (Curate) on Aug 07, 2003 at 20:04 UTC |