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

Hi guys!

I'm currently using Perl Dancer and TT2 to make a application in the browser.

I have a program which loops through a larger array and splits it into smaller ones - I would like each of these smaller arrays to populate an HTML template(which file being conditional on the size of the parameter array), I would then like the populated HTML template to be saved to a file for retrieval later on.

Is there anything that can do such a task?

  • Comment on Populate an HTML template and save as a new HTML file

Replies are listed 'Best First'.
Re: Populate an HTML template and save as a new HTML file
by Corion (Patriarch) on Jul 29, 2014 at 11:58 UTC

    For example, Template, which you already use.

    I'm not sure where the problem is in iterating over your array of data, splitting it into smaller ones and then writing the appropriate HTML files. Maybe you can show us the code you have already written and explain to us where you face problems with it?