in reply to telnet passthrough

So, you need to simulate a telnet session? You send login and password, and detect a prompt for confirmation. You send string X, and expect response Y. You send string A, and expect response B, C, or D.

I'd suggest using Expect.pm. It's got a built in function for detecting the prompt, and it's really easy to fork through possible responses.

-Logan
"What do I want? I'm an American. I want more."