Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: HTML::Template create table

by zer (Deacon)
on Nov 17, 2007 at 21:28 UTC ( #651452=note: print w/replies, xml ) Need Help??


in reply to HTML::Template create table

you need to set up the parameters for the template.
$template->param(ROWS=>$arrayReference);
The array reference is a list of hashes, so if you were to type this out logicaly it would look something like this

$arrayref->[0]->{day}=Monday $arrayref->[0]->{type}=snow $arrayref->[1]->{day}=Tuesday $arrayref->[1]->{day}=rain $arrayref->[2]->{day}=Wednesday ... etc
Be sure to look at HTML::Template for some good examples and documentation.

As well take a look at perldsc for a tutorial on how to make arrays of hashes.

Replies are listed 'Best First'.
Re^2: HTML::Template create table
by GertMT (Hermit) on Nov 18, 2007 at 21:14 UTC
    thanks for the very clear explanation! Together with the link to perldoc I'll be able to create that from the csv-file. Need to do some thinking again about how to start from my database processing but I'll take the challenge.
    Gert

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2022-08-17 20:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?