On 8/1/05, Ghais Issa <[EMAIL PROTECTED]> wrote:
> What options do i have regarding the output of $tt->process apart from
> STDOUT and to a file, is there a way to store it in a string, or even
> redirect it to a system call

To save the results in a string, pass a reference to a scalar as the
third option to process:

my $html = '';
tt_obj->process($file, \%params, \$html);

Here is the relative info from the docs:

...and the output written to; a file GLOB opened ready for output; a
reference to a scalar (e.g. a text string) to which output/error is
appended; a reference to a subroutine which is called, passing the
output as a parameter; or any object reference which implements a
'print' method (e.g. IO::Handle, Apache::Request, etc.) which will be
called, passing the generated output as a parameter.

Cheers,

Cees

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

Reply via email to