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

Re: HTML::Template create table

by zer (Deacon)
on Nov 17, 2007 at 21:28 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-19 23:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found