|Do you know where your variables are?|
Problem with telnet and pagingby anton (Initiate)
|on Dec 19, 2012 at 11:20 UTC||Need Help??|
anton has asked for the
wisdom of the Perl Monks concerning the following question:
Hi! First of all, I'm a beginner at perl - so be easy on me :) I'm trying to write a program which uses Net::Telnet to check information on my router (switch (different manufacturers)), and I have a problem with some commands returning a lot of data. I'm using:
It causes a time-out and quits the program. My theory is that the output data is page'd (the switch responds with either "--More--" or "Press c for continous, q for quit, <space> for one more row" and then halts until a char has been pressed. But "->cmd" doesn't issue this, tries to read for X seconds then quits. Is there any way I can tell the Telnet-package to read everything, or do I need to use $telnet->send and $telnet->getline? :< I know that this might be the wrong forum to ask this, but I'm running out of ideas. =) Thanks in advance. Best regards, Anton.