Gavin Henry wrote:
$tt->process( \*DATA, $tt_vars, \$email_output )
|| die $tt->error(), "\n";
Hi Gavin,
The problem is here. The template is only available to be read
from the DATA handle the first time around the loop. By the second
iteration, the DATA file pointer is already at the EOF and it
effectively looks like a zero-length template.
Try this instead:
local $/ = undef; # slurp file in one go
my $tt = Template->new( # define named template
BLOCKS => {
email => <DATA>,
},
);
$tt->process('email', ...etc...)
HTH
A
_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates