in reply to Saving a Perl session to a file

Thanks for the many suggestions. I think what is working best for me is using the IO:Tee module. All screen output is also captured in the log file. And as one poster suggested, I just need to add an explicit print to reflect the user input, so it also captured. Here's a simple example:
use IO::Tee; use IO::File; my $tee = new IO::Tee(\*STDOUT, new IO::File(">myLogfile.log")); select $tee; print "\nHow old are you: "; my $age = <STDIN>; print "\nYou entered $age\n"; my $year = 2017 - $age; print "You were born in $year\n"