As marto mentioned, script handles prompting better than tee. However, you will still have escape sequences cluttering up your log. To get rid of them, set the environment variable TERM to "dumb", which works for most character-based programs that send escape sequences.
For example:
script -c 'TERM=dumb cpan' -a mylog.txt
If you used the backspace key to make corrections and need to remove the backspaces and the erased characters from the log, try this:
perl -i.bak -wpe '1 while s/[^\x08]\x08//' mylog.txt