Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

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

by ramrod (Hermit)
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.


Comment on Re: Twig Question: Create a new XML doc using twig?
Download Code
Re^2: Twig Question: Create a new XML doc using twig?
by GrandFather (Cardinal) 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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (12)
As of 2014-08-21 20:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (143 votes), past polls