perl my_script.pl | tee my_logfile.dat