So, erm, redirect stderr to a file. And if you have log_user enabled then redirect stdout as well. I'll just mention perldoc perlopentut rather than quoting and pointing out the relevant section since you seem to have a problem with that.
In reply to Re^3: Send "Expect.pm" debug and screen output to a file
by Fletch
in thread Send "Expect.pm" debug and screen output to a file
by chime
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |