pbwiz1970 has asked for the wisdom of the Perl Monks concerning the following question:
I am having a frustrating problem extracting information from routers and switches.
I have tried several variations of code, but for some reason, I am not getting any results in my variables.
Here is a code snippet.
I have verified that the script opens the connection to the device, and authenticates. For whatever reason, when I try to print out the @results, like followsmy @results = $telnetvar->cmd(String => 'show version', Prompt => '/#/') ;
I never get any results in $resultline I have written similar code elsewhere, and it still works, yet this is not working. I've tried it using activePerl 5.8 on both Windows and Unix (Sun), and using Perl 5.003 on Unix, and also using the Net::Telnet and even the Net::Telnet::Cisco mods. No luck. Any ideas on what I can try next? Thanksforeach $resultline (@results) { print OUTPUT "$resultline\n"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Net::Telnet on routers and switches
by rodion (Chaplain) on Mar 06, 2007 at 01:59 UTC | |
Re: Net::Telnet on routers and switches
by quester (Vicar) on Mar 06, 2007 at 06:51 UTC | |
by quester (Vicar) on Mar 06, 2007 at 20:10 UTC | |
Re:Net::Telnet on routers and switches
by traveler (Parson) on Mar 05, 2007 at 22:55 UTC | |
Re: Net::Telnet on routers and switches
by jasonk (Parson) on Mar 06, 2007 at 11:58 UTC | |
by pbwiz1970 (Initiate) on Mar 06, 2007 at 17:22 UTC |
Back to
Seekers of Perl Wisdom