You are looking at a very old, but free version of the course. If you are interesed the most recent version, check it out on the Perl Maven site.

7.18. Recording session

A simple example how to "record" a session for later analysing and changing into a real script.

Example 7-9. examples/expect/record.pl

#!/usr/bin/perl
use strict;
use warnings;

use Expect;

my $exp = Expect->spawn("bash") or die "Cannot spawn bash child\n";

$exp->log_file($ARGV[0] || "record.log");

#$exp->raw_pty(1);

$exp->interact();


If you are interested in on-site trainings by the author, please contact me directly.