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 | [reply] [Watch: Dir/Any] |
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.
| [reply] [Watch: Dir/Any] [d/l] [select] |