use IO::Tee (); my $fh_out = IO::Tee->new(\*STDOUT, \*LOG); select($fh_out); print("hello"); print("world");