Re: loop through a hash structure without knowing the hash keys?

Carl Franks <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.html-template
Message-ID <[email protected]>
>  e.g.
>  <tmpl_loop students>
>  <tmpl_var name>
>  </tmpl_loop>

a TMPL_LOOP doesn't take a hash, it takes an array-ref of hash-refs
that would be

my @loop = (
{name => 'a'},
{name => 'b'},
);

$tmpl->param( students => \@loop );

If you knew that already, give an example of what sort of data you
want to put in, and what you want the HTML to look like.

Cheers,
Carl


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.