You're expecting $cs->print('set pass') to return some kind of object. Apparently, it doesn't. Perhaps you want to call waitfor() on the object in $cs instead?my $telnet = $cs -> print('set pass') or die "Error giving \"set pass\" command.\n"; ($before,$match) = $telnet -> waitfor('Enter old password:') or die "Error getting \"Enter old password\" prompt\n";
In reply to Re: Net::Telnet and waitfor()
by chipmunk
in thread Net::Telnet and waitfor()
by ybiC
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |