The third parameter in your first example has to be a reference to a scalar, not a 
scalar itself. so:

$tt->process($html_template, $vars, \$output) || die $tt->error(), "\n";


-Stephen

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Yussef
Elsirgany
Sent: Wednesday, September 12, 2001 03:18 PM
To: [EMAIL PROTECTED]
Subject: [Templates] Process() output to a variable



Dear List,

Can anyone point out to me how I can return the output of process() to a
variable in a perl script.
I have been trying:

BEFORE
$tt->process($html_template, $vars, $output) || die $tt->error(), "\n";
$tt->error(), "\n";

NOW
$output = $tt->process($html_template, $vars) || die $tt->error(), "\n";
$tt->error(), "\n";


On both cases output goes out to standard output and this is driving me
nuts!  Thanks all for your help.


Best Regards,

Yussef M. ElSirgany
Software Engineer

Lifeascode.com
Email: [EMAIL PROTECTED]
Phone: 516-445-1378
Fax:   516-484-2424



_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://www.template-toolkit.org/mailman/listinfo/templates



Reply via email to