Perl version of the TCL expect tool
