On Wed, Oct 05, 2005 at 08:46:01AM +0200, Francois Billard wrote:
>  
> I have a key of a hastable with dot inside (ex : foo.bar) , how should
> display it in my web page ? if i use this :
> [% myhash.foo.bar %]   it doesn t work because TT engine see the dot of
> foo.bar as a data structure separator.
> how extract the value of my $myhash{"foo.bar"} with TT ??
>  

You should use the item() virtual method:

[% myhash.item('foo.bar') %]

I tend to use this quite a bit when I don't know in advance what keys
a hash might contain, saves any chance of problems occurring.

Stephen



_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to