in reply to Templates and hash arrays?

Think normal 'for' loop:

for my $element (@e2event) { print $element->{e2eventname}; }

Note: NOT $e2event->{e2eventname}

Replies are listed 'Best First'.
Re^2: Templates and hash arrays?
by packetstormer (Monk) on Sep 13, 2011 at 14:29 UTC
    Hi, I actually had a type in my first post the I have fixed, I should have read exactly as you say - but that doesn't work!

      OK - I assumed that the e2event in your foreach was the e2event value from the $VAR1 dumped.

      [% FOREACH element IN VAR1.e2event %] [% element.e2eventname %] [% END %]

      Replace VAR1 with the actual variable you dumped.

      To see how the template sees your variable:

      [% USE Dumper indent=2 %] [% Dumper.dump(some_variable) %]

        That's it! - thanks!

        The dump I submitted is actually from the Dumper.dump within Templates. However, I just find it so hard to get my head around these things!