in reply to Net::Telnet Question

"I get these logs as a response to my next command. "

I can think of two pissiblities:

Replies are listed 'Best First'.
Re^2: Net::Telnet Question
by Anonymous Monk on Nov 19, 2004 at 15:59 UTC
    I do not use "Prompt =>" thing because on my login, I do not get a prompt (or different than) and I get a prompt for my commands.

    I did not understand the "\n" part of what you said. Do you mean sending a "\n" once in a while during non-interactive period? The sequence of commands I use are

    new Net::Telnet() $telnet->print() $telnet->waitfor()

    $telnet->cmd() makes my things complicated as I have to specify the prompt which I cannot with one regex.

    Thanks

      I think you're going to have to be more explicit. I can only guess that your problem is that you want to read all text output (the log) until your regex matches what should be the prompt for a new command, and its matching something in the log instead?

      If so, what is your regex exactly, whats the prompt you want to match, and what is in the system log that is getting matched instead?

      If thats not it, then I've no clue, sorry.

      C.