Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Using HTML Template to fill a 2-dimensional table

by jms53 (Monk)
on Feb 19, 2013 at 14:51 UTC ( #1019582=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
         <TABLE BORDER="1">
         <TR><TD>Transaction</TD><TD>DATE</TD><TD>Type</TD><TD>Amount</TD>
    +<TD>Ending Balance</TD></TR>
    ...
             <TD><TMPL_VAR NAME="Ending_Balance"></TD></TR>
             </TMPL_LOOP>
        </TABLE>
    
  2. or download this
    
    my $template = HTML::Template->new( filename => 'atm_choose.tmpl', die
    +_on_bad_params => 0 );
    ...
    10/02/2013 & closing balance & 0 & 1000
    11/02/2013 & debit & 100 & 900
    12/02/2013 & credit & 1000 & 1900
    
  3. or download this
    while (<DATA>)
    {
    ...
    $template->param(TRANSACTIONS => [{Date => $split[0][0], Type => $spli
    +t[0][1], Amount => $split[0][2], Ending_Balance => $split[0][3]},
                      {Date => $split[1][0], Type => $split[1][1], Amount 
    +=> $split[1][2], Ending_Balance => $split[1][3]},
                      {Date => $split[2][0], Type => $split[2][1], Amount 
    +=> $split[2][2], Ending_Balance => $split[2][3]} ]);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1019582]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (10)
As of 2014-12-23 03:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (134 votes), past polls