* at 29/01 15:17 -0000 [EMAIL PROTECTED] said:
> So TT nicely allows a filename, a filehandle or blank for STDOUT. 
> So how to I capture the output to "some variable" so I could, say,
> manipulate that output 
> without having to read the file I've outputted? 
> Is that possible? 

mmm, this should be a FAQ...

perldoc Template:

       By default, the processed template output is printed to
       STDOUT.  The process() method then returns 1 to indicate
       success.  A third parameter may be passed to the process()
       method to specify a different output location.  This value
       may be one of: a plain string indicating a filename which
       will be opened (relative to OUTPUT_PATH, if defined) 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

If you note, the third paramater can be a ref to a scalar to which the
output is appended.



(sho missed this fisrt time round too :)

Reply via email to