[Templates] Array of hashes or hash refs
[prev]
[thread]
[next]
[Date index for 2004/09/23]
This is a combination of perl and TT question.
I am running ActiveStatePerl 5.8 on a Win2K server running IIS (whatever).
I'm querying a MS SQL Server database and returning multiple tuples per
query. I need to display of them in one document and the FOREACH looks
like the ticket but this appears to be a strange process need.
Currently I'm passing a hashref to the TT process
$sut->process($filename, \%CSI); (No not Crime Scene
Investigation :-)
but now need to pass in a bunch of hashes(/refs) that will get displayed
in a table. So %CSI would have ToDay => 'Sep 23, 2004'; PageTitle => 'Not
doing so well', etc. I now need to pass in multiple hashes like
this.
{ LastName => Smith, FirstName => John, ID => BR549 }
What kind of structure do I need to construct and pass in to TT? Heck ..
can I pass in multiple hashes or even arrays?
TIA,
Rod
--
"Open Source Software - You usually get more than you pay for..."
"Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL"
_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates
 |
[Templates] Array of hashes or hash refs
Roderick A. Anderson 23:39 on 23 Sep 2004
|