in reply to Printing both to console and File
The doc for IO::Tee indicates (unsurprisingly) that you need to pass two filehandles to the constructor, not construct two instances:
use IO::Tee; $tee = IO::Tee->new($handle1, $handle2); print $tee "foo", "bar";
For another approach see Log::Any, Log::Any::Adapter, Log::Any::Adapter::Dispatch.
Hope this helps!
The way forward always starts with a minimal test.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Printing both to console and File
by perluser455 (Initiate) on May 17, 2017 at 10:15 UTC | |
by Eily (Monsignor) on May 17, 2017 at 14:54 UTC |
In Section
Seekers of Perl Wisdom