Ok, thank you very much.
The problem was that @authorlog was not defined as global variable but as local 
variable.

--- Mer 18/8/10, Dave Cross <[email protected]> ha scritto:

> Da: Dave Cross <[email protected]>
> Oggetto: Re: [Templates] problem with array and FOEARCH
> A: [email protected]
> Data: Mercoledì 18 agosto 2010, 20:23
> On 08/18/2010 06:21 PM, dark0s
> wrote:
> > It outputs 0.
> > 
> > I fill array in following way in .cgi script.
> > 
> > my $vars = {
> >   authors = \...@authorslog;
> > }
> > $tt2->process('page.html', $vars) || die
> $tt2->error();
> 
> Do you have "use strict" and "use warnings" on? Do you get
> any errors?
> 
> There are a couple of subtle errors in that code. It should
> probably be:
> 
> my $vars = {
>   authors = \...@authorslog, # comma not semicolon
> }; # added semicolon
> 
> $tt2->process('page.html', $vars) || die
> $tt2->error();
> 
> > @authorslog is not empty.
> 
> Maybe not. But you don't seem to be copying it to the
> template variable
> correctly.
> 
> Dave...
> 
> -- 
> Dave Cross :: [email protected]
> http://dave.org.uk/
> @davorg
> 
> _______________________________________________
> templates mailing list
> [email protected]
> http://mail.template-toolkit.org/mailman/listinfo/templates
> 


      


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

Reply via email to