Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Telnet using Expect module

by McDarren (Abbot)
on Aug 26, 2013 at 07:57 UTC ( [id://1050913]=note: print w/replies, xml ) Need Help??


in reply to Telnet using Expect module

This does not directly answer your question... but

From the Expect documentation:

"Are you sure there is no other, easier way? As a rule of thumb, Expect is useful for automating things that expect to talk to a human, where no formal standard applies. For other tasks that do follow a well-defined protocol, there are often better-suited modules that already can handle those protocols. Don't try to do HTTP requests by spawning telnet to port 80, use LWP instead. To automate FTP, take a look at Net::FTP or ncftp (http://www.ncftp.org). You don't use a screwdriver to hammer in your nails either, or do you?"

In this case, you have a well-defined protocol, and the better-suited module would be Net::Telnet. Have you considered using that instead?

Replies are listed 'Best First'.
Re^2: Telnet using Expect module
by salva (Canon) on Aug 26, 2013 at 09:49 UTC
    Even better would be to connect to the remote host through SSH if possible.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1050913]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-24 19:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found