in reply to Print STDERR&STDOUT to log file and to the screen

There are several modules that allow you to do that (Tee).
use File::Tee qw(tee); tee(STDOUT, '>', "foo/bar.out"); tee(STDERR, '>>', "foo/bar.err");