Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!caen!sdd.hp.com!think.com!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.shell Subject: Re: Using PERL to control telnet session? Message-ID: <1991May7.102752.18364@athena.mit.edu> Date: 7 May 91 10:27:52 GMT References: <32922@shamash.cdc.com> Sender: news@athena.mit.edu (News system) Organization: Massachusetts Institute of Technology Lines: 23 In article <32922@shamash.cdc.com>, dwb@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@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@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8085 Home: 617-782-0710