in reply to more than I can chew
Just to reiterate what athomason said, Expect.pm is the
correct approach. A large part of my job is communicating
with external systems via telnet. My older stuff uses
comm.pl, but as I have time, I'm migrating to Expect.pm.