Think about Loose Coupling | |
PerlMonks |
Changing data structure with HTML::Templateby jms53 (Monk) |
on Feb 06, 2014 at 16:46 UTC ( [id://1073726]=perlquestion: print w/replies, xml ) | Need Help?? |
jms53 has asked for the wisdom of the Perl Monks concerning the following question:
Hello monks,
I'm having some trouble displaying a table. The original code, cgi: $account->{transactions} = [ map { { line => $_ } } @transactions ]; where @transactions is filled with tab-separated values. I want to display the elements of @transactions as a nice 2 dimensional table. Hence my new code, with the TMPL_LOOP: $account->{transactions} = [ map { { line => $_ } } @transactions ]; where @transactions is populated with array references: push @transactions, \[$date, $type, $amount, $new_balance]; and the TMPL bit:
I don't know wether to look into altering the tmpl file or if my datastructure is just plain wrong?
Thank you!
J -
Back to
Seekers of Perl Wisdom
|
|