in reply to Re^3: Problem with Net::Telnet
in thread Problem with Net::Telnet
Yes, it's right at line 24 where it times out.
username: xxxx
password: zzzz
yyyy#
Now if I remove $device and just enter a specific name followed by the prompt(#), it prints out exactly what I want. It's just when I try to use a variable I run into this problem.
This works. Maybe it has something to do with the prompt? I removed "." from the line and it still times out.
From the output I can see it authenticate, but once I get to the prompt it times out. My output file looks something like this:$telnet->waitfor('/$device# /i'); ##wait for prompt
username: xxxx
password: zzzz
yyyy#
Now if I remove $device and just enter a specific name followed by the prompt(#), it prints out exactly what I want. It's just when I try to use a variable I run into this problem.
$telnet->waitfor('/yyyy# /i'); ##wait for prompt
This works. Maybe it has something to do with the prompt? I removed "." from the line and it still times out.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Problem with Net::Telnet
by frozenwithjoy (Priest) on Nov 26, 2012 at 05:37 UTC | |
Re^5: Problem with Net::Telnet
by aitap (Curate) on Nov 26, 2012 at 17:21 UTC |
In Section
Seekers of Perl Wisdom