in reply to Re: Need help getting output from Telnet into a string or array
in thread Need help getting output from Telnet into a string or array
it STOPS at the first prompt where the ls is being issued. I changed my code to@array=$telnet->cmd(string => 'ls', prompt => '/=>/');
my output is => (the prompt before the ls). I tested this with another switch which has a different output and had a unique word in it (free) and it produced all info up to that word which is what I believe it's supposed to do. Now I guess what my question is, why is my cmd picking up the first prompt and not the second after the output? Thanks@array=$telnet->cmd(string => 'ls', prompt =>'/ls/');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Need help getting output from Telnet into a string or array
by pklausner (Scribe) on Mar 19, 2012 at 16:12 UTC |