Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Using Conditionals with Net::Telnet

by tilly (Archbishop)
on Jan 20, 2011 at 16:17 UTC ( [id://883359]=note: print w/replies, xml ) Need Help??


in reply to Using Conditionals with Net::Telnet

Have you tried Expect? It is used to control external applications, and is good for scripted response flows.

But based on past experience, I'd strongly suggest modifying the application to have some sort of "batch mode" where it just does what it is told and doesn't try to interact, and then just call that. This will make your life a *lot* easier. And in the long run will be less fragile than trying to script what to do for every unknown prompt.

  • Comment on Re: Using Conditionals with Net::Telnet

Replies are listed 'Best First'.
Re^2: Using Conditionals with Net::Telnet
by MKJ747 (Acolyte) on Jan 20, 2011 at 17:11 UTC

    Thanks for the reply, tilly. Unfortunately, I have no control over the external application, so I will try using Expect and see where it gets me.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2024-04-24 09:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found