my $htc = HTML::Template::Compiled->new( filename => "test.html", use_expressions => 1, tagstyle => [qw/ +tt /], loop_context_vars => 1, ); $htc->param( current => \@AoHcurrent, previous => \@AoHprevious, ); template: NODE LINK VALUE --------------------- [%loop current %] [%= node %] [%= link %] [%= value %] ([%= expr=".previous[__index__]{'value'}" %]) [%/loop current %]