in reply to Re: Net::Telnet Question
in thread Net::Telnet Question

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

Replies are listed 'Best First'.
Re^3: Net::Telnet Question
by castaway (Parson) on Nov 19, 2004 at 20:20 UTC
    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.