my ($file1, $file2, $file3) = qw/this.out that.out other.out/; my $fh; open $fh, "| tee $file1 $file2 $file3 > /dev/null" or die $!; print $fh "data\n" or die $!; close $fh or die $!;