> my $vars = {
> copyright => 'released under the GPL 2008',
> > result => @results
> > };
> >
> > But that doesn't seem to work, and I'm not convinced by my row[n]
> > syntax either.
> You are storing the number of rows in @results. In scalar context like
> that, the length of the array is used.
Actually, not. "=>" implies a list context, nor scalar, which means that
the following prints 'c':
#! /usr/bin/perl -w
my @a = ('a', 'b', 'c');
my $b = { '1' => @a };
print $b->{b};
This is high on my "most hated Perl features, ever" list, although it's
quite handy after a few years experience. ;-)
-M.
PS: but of course, I can't argue with the advice. Always use references._______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates