The problem in this case is the flush method, which does some light magic to output the parts of the tree that haven't been output yet, and then updates the state of the XML::Twig object (so the next call to flush Just Works™). You can't call it twice in a row, with 2 different filehandles, it wouldn't work. That's why using IO::Tee is a brilliant idea.
In reply to Re^2: XML::Twig - Filtering and duplexing output to multiple output files
by mirod
in thread [SOLVED] XML::Twig - Filtering and duplexing output to multiple output files
by ateague
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |