Binary package “libexpect-perl” in ubuntu bionic - Perl Expect interface

 The Expect module is a successor of and a descendent of It
 more closely resembles the Tcl Expect language than its predecessors. It
 does not contain any of the networking code found in I suspect this
 would be obsolete anyway given the advent of IO::Socket and external tools
 such as netcat.
 . is an attempt to have more of a switch() & case: feel to make
 decision processing more fluid. three separate types of debugging have
 been implemented to make code production easier.
 It is now possible to interconnect multiple file handles (and processes) much
 like Tcl's expect. An attempt was made to enable all the features of Tcl's
 expect without forcing Tcl on the victim programmer :-) .