You'll want to start with Expect::Simple. And, frankly, you can start with the following methods and probably never need more:
- send() - this is what you use to interact with STDIN
- before() - this is what the prompt was that you just sent stuff to with send()
- after() - this is what the program blabs to you after you send the stuff with send()
If you need more, then more reading is the thing to do. Note: As you've found out, interacting with STDIN is hard. Don't complain if you have to read for a few hours to have someone else take all the craziness out of it for you.
Being right, does not endow the right to be rude; politeness costs nothing. Being unknowing, is not the same as being stupid. Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence. Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.
| [reply] |