#!/usr/bin/env perl use strict; use warnings; use Template; # Set up your data my $data = { table => [ { head => 'Bookings this month', val => 132, }, { head => 'Previous 30 days', val => 99, }, { head => 'Forthcoming 30 days', val => 150, }, { head => 'Forthcoming 60 days', val => 189, }, ], event_count => 1, call_list => 5 }; # Set up your template (easiest/commonest in an external datastore (file # or DB) my $template = <

FHL Properties:

[% FOR k IN table %] [% END %]
[% k.head %]: [% k.val %]

[% USE infl = Lingua.EN.Inflexion; FILTER inflect; -%]

Progress in Property Event:

<#:[% event_count %]> registered their interest.


Customer Contentment Call List:

<#d:[% call_list %]> There [% call_list %] who on the Call List.


[% END %] EOT # Run it Template->new->process (\$template, $data); exit;