You can use File :: Tee .
use File::Tee qw(tee); tee STDOUT, '>>', 'some_file.out'; print "w00p w00p";
If File::Tee not available, it is easy to model using the pipeline:
open my $tee, "|-", "tee some_file.out"; print $tee "w00p w00p"; close $tee;
source share