in reply to process lists of array_refs with Template-Toolkit

UPDATE: I just got an email from the Template-Toolkit mailing list - please announce the other forums where you have asked your question in the future. It's just good Netiquette.

Another example:
use strict; use warnings; use Template; my $tt2 = Template->new; $tt2->process(\*DATA, { AoA => [ [0,1],[2,3],[4,5] ], AoH => [ {a=>'b'},{c=>'d'} ], }); __DATA__ AoA: [% FOREACH outer_a = AoA -%] [% FOREACH inner_a = outer_a -%] [% inner_a %] [% END -%] [% END -%] AoH: [% FOREACH outer_h = AoH -%] [% FOREACH key = outer_h.keys.sort -%] [% key %] => [% outer_h.$key %] [% END -%] [% END -%]

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)