in reply to Capturing program output

use pipes as others have suggested or the oo wrapper IO::Pipe and just write to the pipe in an anonymous sub that is passed into the template process method.

Replies are listed 'Best First'.
Re^2: Capturing program output
by Anonyrnous Monk (Hermit) on Jan 14, 2011 at 15:56 UTC

    The problem is not so much setting up the pipes on the Perl side, but rather getting the other side (svg2pdf in this case) to communicate via the pipes, if it expects to do its IO solely via named files instead of stdin/stdout — as svg2pdf apparently does, according to the OP.

    IO::Pipe won't really help in this regard. as it sets up normal anonymous pipes, and those can only be used if the subprocess on the other end cooperates.