Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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

by torvir (Initiate)
on Jul 06, 2011 at 21:00 UTC ( [id://913087]=note: print w/replies, xml ) Need Help??


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

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://913087]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (2)
As of 2024-04-26 03:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found