Skip to content
Official source code of the Expect Perl module
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Build Status

Expect requires the latest version of IO::Tty, also available from CPAN. IO::Stty has become optional but I'd suggest you also install it. If you use the highly recommended CPAN module, there is a Bundle::Expect available that installs everything for you.

If you prefer manual installation, the usual

perl Makefile.PL
make test
make install

should work.

Note that IO::Tty is very system-dependend. It has been extensively reworked and tested, but there still may be systems that have problems.

Please be sure to read the FAQ section in the Expect pod manpage, especially the section about using Expect to control telnet/ssh etc. There are other ways to work around password entry, you definitely don't need Expect for ssh automatisation!

The Perl Expect module was inspired more by the functionality of Tcl/Expect than any previous Expect-like tool such as or

The Tcl version of Expect is a creation of Don Libes ( and can be found at Don has written an excellent in-depth tutorial of Tcl/Expect, which is Exploring Expect. It is the O'Reilly book with the monkey on the front. Don has several references to other articles on the Expect web page.

I try to stay as close to Tcl/Expect in interface and semantics as possible (so I can refer questions to the Tcl/Expect docu). Suggestions for improvement are always welcome.

There are two mailing lists available, expectperl-announce and expectperl-discuss, at


Thanks to everybody who wrote to me, either with bug reports, enhancement suggestions or especially fixes!

Dave Jacoby (maintaner of


You can’t perform that action at this time.