Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Re: Template::Toolkit: better way to generate variable names?

by geektron (Curate)
on Aug 06, 2003 at 13:01 UTC ( [id://281378]=note: print w/replies, xml ) Need Help??


in reply to Re: Template::Toolkit: better way to generate variable names?
in thread Template::Toolkit: better way to generate variable names?

i really don't need a hash or array in this case.

if it were straight perl, i would have done:

foreach my $counterVar ( 1 .. 5 ) { $foo = "string" . $counterVar; }
the issue was with the TT meta-language, really. it *can* get a bit odd...

what i *do* need out of the suggestion is:

[% SET FOO = 'string' _$n %]
-- i do need to double-check the underscore location ... --

after reading the previous reply, the connection between TT's meta-language and 'core perl' kicked in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://281378]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (8)
As of 2024-04-18 14:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found