Using PERL to control telnet session?

Jonathan I. Kamens jik at athena.mit.edu
Tue May 7 20:27:52 AEST 1991


In article <32922 at shamash.cdc.com>, dwb at hare.cdc.com (dw block x-4621) writes:
|> Can I use PERL to control interactive programs such as telnet and ftp.  What I
|> am really looking for is a scripting capability similar to what you find in 
|> PC communications packages like crosstalk and procomm.  Send a command and
|> wait until you get some output back.  Then send another command (which could
|> be conditional on what kind of output you got back).

In article <mstgil.673591467 at sol>, mstgil at sol (Marc Ph. A. J. St.-Gil) writes:
|> You are looking for a perl program called chat2.

  Another option is the "expect" package, by Don Libes, available at an
archive site near you.  "Expect" was specifically designed to handle this
problem.

  Of course, I believe someone reimplemented "expect" in perl, and released a
version of that in alt.sources as well, so you might want to check the
alt.sources archives.

-- 
Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik at Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8085			      Home: 617-782-0710



More information about the Comp.unix.shell mailing list