Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Using HTML Template to fill a 2-dimensional table

by Anonymous Monk
on Feb 19, 2013 at 16:01 UTC ( #1019603=note: print w/ replies, xml ) Need Help??


in reply to Using HTML Template to fill a 2-dimensional table

...edit...

:)

my @names = qw[ Date Type Amount Ending_balance ] ; my @transactions; ... while ... my @row = split '&', $_; my %hashrow; @hashrow{ @names } = @row; push @transactions, \%hashrow ... $template->param(TRANSACTIONS => \@transactions );


Comment on Re: Using HTML Template to fill a 2-dimensional table
Download Code
Re^2: Using HTML Template to fill a 2-dimensional table
by Anonymous Monk on Feb 19, 2013 at 16:03 UTC

    my %hashrow; @hashrow{ qw[ Date Type Amount Ending_balance ] } = split '&', $_;

    my %hashrow; @hashrow{Date} = $row[0]; @hashrow{Type} = $row[1]; @hashrow{Amount} = $row[2]; @hashrow{Ending_balance} = $row[3];
Re^2: Using HTML Template to fill a 2-dimensional table
by Anonymous Monk on Feb 19, 2013 at 16:06 UTC

    my %hashrow = ( # ((( round Date => $row[0], Type => $row[1], Amount => $row[2], Ending_balance => $row[3], );

    my %hashrow = ( Date => $row[0], Type => $row[1], Amount => $row[2], Ending_balance => $row[3], ); # ))) round

    my $hashrow = { # {{{ curly Date => $row[0], Type => $row[1], Amount => $row[2], Ending_balance => $row[3], }; # }}} curly

    push @transactions, { # {{{ curly Date => $row[0], Type => $row[1], Amount => $row[2], Ending_balance => $row[3], }; # }}} curly

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1019603]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (15)
As of 2014-12-17 21:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (34 votes), past polls