more useful options | |
PerlMonks |
Re: Split output to STDOUT as well as a fileby Athanasius (Archbishop) |
on Jan 05, 2016 at 06:34 UTC ( [id://1151915]=note: print w/replies, xml ) | Need Help?? |
Hello razmeth, and welcome to the Monastery! The IO::Tee module recommended by BrowserUk is likely the best fit for your stated requirements. But if you need something fancier, consider Tie::STDOUT:
Output:
Contents of file “test.txt”:
Hope that helps,
In Section
Seekers of Perl Wisdom
|
|