-- 
Walking the road to enlightenment... I found a penguin and a camel on the
way..... Fancy a [EMAIL PROTECTED] Just ask!!!
http://perlmonks.org/?node_id=386673

<quote who="Andy Wardley">
> 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...)

Maybe I am right and need to seek to beginning:

http://perlmonks.org/?node_id=484333

??

>
>
> HTH
> A
>


_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to