$exp->log_file("file") or $exp->log_file(\&coderef)
> $exp->send("$command\r");
> $exp->expect($timeout, "$command\r\n");
and to finish logging use
$exp->log_file(undef)
>Also, if anyone knows of any good Perl Expect tutorials or demo pages,
Expect has very good manual: perldoc Expect
also take a look on tutorial directory that comes with Expect distribution.