in reply to Re^2: Dynamic variable naming in Template Toolkit
in thread Dynamic variable naming in Template Toolkit

Try ${var_name} = 'bar', and if that doesn't work, ask on the TT mailing list. I think TT supports this.
  • Comment on Re^3: Dynamic variable naming in Template Toolkit

Replies are listed 'Best First'.
Re^4: Dynamic variable naming in Template Toolkit
by agianni (Hermit) on May 31, 2007 at 16:03 UTC

    That did it, in fact the code I posted above:

    [% var = 'foo'; $var = 'bar'; # now $foo eq 'bar'! %]

    actually works without the braces, I found a typo in my code :P

    perl -e 'split//,q{john hurl, pest caretaker}and(map{print @_[$_]}(joi +n(q{},map{sprintf(qq{%010u},$_)}(2**2*307*4993,5*101*641*5261,7*59*79 +*36997,13*17*71*45131,3**2*67*89*167*181))=~/\d{2}/g));'