Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Twig Question: Create a new XML doc using twig?

by ramrod (Curate)
on Mar 23, 2009 at 01:45 UTC ( #752469=note: print w/replies, xml ) Need Help??


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 (Sage) 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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://752469]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (1)
As of 2016-12-09 05:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (148 votes). Check out past polls.