in reply to Re^2: Telnet extract output
in thread Telnet extract output

Does your prompt match the actual prompt?

Could your prompt possibly match some data somewhere in the logs? That would cause it to think output has stopped when it hasn't.

Make your prompt the most restrictive thing that you can. If you can, it may help to issue a command to change your prompt to something you're sure is not in the logs (setting the PS1 environment variable does it in bash) and setting your prompt to the new prompt.

Replies are listed 'Best First'.
Re^4: Telnet extract output
by ScOut3R (Sexton) on Aug 01, 2008 at 19:35 UTC
    Nope it didn't match anything in the log output. I've set it as restrictive as i can. If i use the ^ and $ metacharacters then the situation just get worse because of command timeout. I think i have to figure it out, because the problem is clearly with the prompt variable.
      Did you try changing the prompt? Did you try, as an experiment, to verify your theory by adding in sleeps?

      If none of those help then I can't be of much assistance. If I had the system in front of me it might be a different story, but I don't have MikrotikOS available to play with. I can't run your code. I don't know what exactly you're seeing. And I have not personally used Net::Telnet in this millennium.

        Sleep seems to be a good idea. Thanks for the tip! I'll try it. If it won't help i'll post the relevant part from the dump log. Edit: okay, i got it working, though i can't get the output from cmd() to a list, but i can use input_log than a filehandle on the the file to get what i need.