http://qs321.pair.com?node_id=752469


in reply to Twig Question: Create a new XML doc using twig?

Unless I'm missing the point, all you need to do is add the filehandle reference to your print statement.
$root->print($file_handle);
To print to two files, do this with two filehandles.

Update:Removed quotes per GrandFather's comments. My apologies on the typo.

Replies are listed 'Best First'.
Re^2: Twig Question: Create a new XML doc using twig?
by GrandFather (Saint) on Mar 23, 2009 at 02:36 UTC
    $root->print('$file_handle');

    is unlikely to help - single quoted strings don't interpolate and in fact you probably don't mean to use a string there at all. Most likely you intended:

    $root->print($file_handle);

    True laziness is hard work