hmadhi has asked for the wisdom of the Perl Monks concerning the following question:
I have two Array of Hashes: The first contains values for a current time interval and the second contains values for a previous time interval.
@AoHcurrent=( { node => "ABC", link => "DEF", time => "10:00", value => "100", }, { node => "FGH", link => "IJK", time => "10:00", value => "200", }, ); AoHprevious= ( { node => "ABC", link => "DEF", time => "09:45", value => "10", }, { node => "FGH", link => "IJK", time => "09:45", value => "50", }, );
I want to now use HTML-Template to present this data. Something like :
NODE LINK VALUE --------------------- ABC DEF 100(10) FGH IJK 200 (50)
the values in brackets represent the previous value.
my %html_template_parameters = ( AOHCURRENT => \@AoHcurrent, AOHPREVIOUS => \@AoHprevious, ); my $html_template=qq{Report.tmpl}; my $html_output=qq{Report.html}; htmlReport($html_template,$html_output,\%html_template_parameters) +;
where htmlReport is a function that generates the report
I require guidance on defining the Report.tmpl file.
Thanks you in advance
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: HTML-Template - Array of Hash
by tinita (Parson) on May 29, 2012 at 09:18 UTC | |
|
Re: HTML-Template - Array of Hash
by choroba (Cardinal) on May 29, 2012 at 11:46 UTC | |
by hmadhi (Acolyte) on May 29, 2012 at 11:49 UTC | |
|
Re: HTML-Template - Array of Hash
by Anonymous Monk on May 29, 2012 at 10:25 UTC | |
by anazawa (Scribe) on May 29, 2012 at 10:29 UTC |