You probably shouldn't have the word login as the first argument. Try empty single quotes instead, like so:
$ok = $cs->login('', $switchPassword) or die "Error logging in: @{ $cs->errmsg+() }\n";
since the first agument is userID.
Additional info can be found at perldoc Net::Telnet. I don't have access to chassis Catalysts for the time being, otherwise I'd take your code out for a spin. So please feel free to /msg me or post a reply to this node if any other questions.
hope this helps,
Don
striving toward Perl Adept
(it's pronounced "why-bick")
p.s. I could be wrong, but AFAIK, the only difference between 'use warnings' and '-w' is what versions of the Perl interpreter support them - the former only on 5.6 or greater, the latter useable from waaay back to 4.something props to tye for the ancient history {grin}.
p.p.s. Welcome to the Monastery, ericj!
In reply to Re: Net::Telnet::Cisco, a question (ditch the arugment 'login')
by ybiC
in thread Net::Telnet::Cisco, a question
by ericj
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |