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.