Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^4: telnet from a cisco telnet

by Corion (Pope)
on Aug 09, 2011 at 12:21 UTC ( #919462=note: print w/ replies, xml ) Need Help??


in reply to Re^3: telnet from a cisco telnet
in thread telnet from a cisco telnet

@output=$t->print("show system"); $t->waitfor('m/]>/');

This cannot work, because the output of show system will only be available after you have assigned it into @output. You will need to use $t->cmd(...) to collect the output of a command.


Comment on Re^4: telnet from a cisco telnet
Select or Download Code
Replies are listed 'Best First'.
Re^5: telnet from a cisco telnet
by Kumar Mantri (Novice) on Aug 09, 2011 at 12:35 UTC
    the other device which i am doing telnet from cisco router is not a cisco device thats why im using ...but i change like u suggested but i got a timeout message at that line.. thank u....
    $t->print(..);

      If you get a timeout, then the prompt that your appliance uses is not a prompt that is recognized by Net::Telnet::Cisco (or Net::Telnet). Read the documentation and supply the appropriate prompt, and everything should work.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://919462]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2015-07-29 08:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (261 votes), past polls