"be consistent" | |
PerlMonks |
Re^2: XML::Twig - Filtering and duplexing output to multiple output filesby mirod (Canon) |
on Nov 12, 2014 at 14:14 UTC ( [id://1106977]=note: print w/replies, xml ) | Need Help?? |
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 Section
Seekers of Perl Wisdom
|
|