in reply to Template Toolkit and unpredictable hashrefs
If I were tackling such a problem, I would use a slightly different data structure.
Then in your template:my $ips = [ { ip => '10.1.7.142', counter => 2, clusterstatus => 'on', }, { ip => '10.1.7.11', counter => 3, clusterstatus => 'off', }, { ip => '10.1.7.112', counter => 3, clusterstatus => 'on', }, ];
[% FOREACH item IN ips %] this is ip is [% item.ip %] counter is [% ip.counter %] [% END %]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Template Toolkit and unpredictable hashrefs
by ikegami (Patriarch) on Mar 30, 2010 at 17:19 UTC |