Don't ask to ask, just ask | |
PerlMonks |
Re: Net::Telnet::Cisco, a question (ditch the arugment 'login')by ybiC (Prior) |
on Dec 18, 2001 at 08:37 UTC ( [id://132781]=note: print w/replies, xml ) | Need Help?? |
Even though perldoc Net::Telnet::Cisco has an example using this syntax, I believe the problem is in this line: my $ok = $cs->login('login', $switchPassword) or die "Error logging in: @{[ $cs->errmsg+() ]}\n";
You probably shouldn't have the word login as the first argument. Try empty single quotes instead, like so:
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.
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 Section
Seekers of Perl Wisdom
|
|