in reply to process lists of array_refs with Template-Toolkit
Example:
#!/usr/bin/perl -wl use strict; use Template; my $template = <<'END_OF_TEMP'; [% FOREACH foo = f %] <pre> START THE OUTPUT [% foo.0 %] [% foo.1 %] </pre> [% END %] END_OF_TEMP my $tt2 = Template->new(); my $vars = { f => [ [ qw(0 1) ] ] # array of arrays }; $tt2->process(\$template,$vars);
Hope this helps.
antirice
The first rule of Perl club is - use Perl
The ith rule of Perl club is - follow rule i - 1 for i > 1
|
|---|