http://www.perlmonks.org?node_id=1050932


in reply to Re: Telnet using Expect module
in thread Telnet using Expect module

Even better would be to connect to the remote host through SSH if possible.