http://qs1969.pair.com?node_id=126919

czarfred has asked for the wisdom of the Perl Monks concerning the following question:

Ive been working on this for a while now, and I cant seem to figure it out.

I decided that I wanted to use HTML::Template for a online phone application that Im doing. I need to basically take rows of data from a database, and pass the values to HTML::Template's param() function, in a way that in my .tmpl file, I can go:

<TMPL_LOOP NAME=EMPLOYEE_INFO> Name: <TMPL_VAR NAME=NAME> <P> Job: <TMPL_VAR NAME=JOB> <P> <P> </TMPL_LOOP>

(Stolen from the docs). My problem is that HTML::Template's param() function expects an arrayref, and, even with DBI's fetchrow_arrayref() function, I dont see how I can get *all* the rows into a single arrayref that I can pass to HTML::Template's param().

Thanks for any and all help!