Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Where is my Net::Telnet output

by Anonymous Monk
on Jul 05, 2011 at 13:06 UTC ( [id://912818]=note: print w/replies, xml ) Need Help??


in reply to Re: Where is my Net::Telnet output
in thread Where is my Net::Telnet output

thanks for the reply. I just tried with Net::Telnet::Cisco and it works. However there 9k boxes that we have have a prompt of "RP/0/RSP0/CPU0:9K-PO1". For such a prompt my connection is not working. Do you know if there is a fix that I can use for this to work. TIA

Replies are listed 'Best First'.
Re^3: Where is my Net::Telnet output
by torvir (Initiate) on Jul 06, 2011 at 21:00 UTC
    Hi, The regexp that is evaluating the prompt doesn't include the characters ":" and "/" that are present in your router names. So you have to alter the regexp used for the prompt. If you create the Net::Telnet::Cisco object "$obj" you can see what regexp is used with   print $obj->prompt, "\n"; And alter it with   $obj->prompt('/(?m:^[\w.:\/-]+\s?(?:\(config[^\)]*\))?\s?[\$#>]\s?(?:\(enable\))?\s*$)/'); The regexp I used above includes your special characters. So that should work.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2024-03-28 23:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found