N
nbufkin
I am trying to connect via telnet from a windows 2000 machine to a
arm32 processor using perl. The example scripts provided by this group
are similiar to the following:
use Net::Telnet ();
$t = new Net::Telnet (Timeout => 10,
Prompt => '/bash\$ $/');
$t->open("sparky");
$t->login($username, $passwd);
@lines = $t->cmd("who");
print @lines;
The device I am connecting to does not require a username and password,
so I have modified the script to look like this:
use Net::Telnet ();
$t = new Net::Telnet (Timeout => 10,
Prompt => '->');
$t->open("10.1.4.2");
@lines = $t->cmd("i");
print @lines;
The script return with the following error message:
"bad match operator: opening delimiter missing: -> at try3 line 2"
The script always fails at the prompt line. Does the Net::Telnet
object require a username and password?
arm32 processor using perl. The example scripts provided by this group
are similiar to the following:
use Net::Telnet ();
$t = new Net::Telnet (Timeout => 10,
Prompt => '/bash\$ $/');
$t->open("sparky");
$t->login($username, $passwd);
@lines = $t->cmd("who");
print @lines;
The device I am connecting to does not require a username and password,
so I have modified the script to look like this:
use Net::Telnet ();
$t = new Net::Telnet (Timeout => 10,
Prompt => '->');
$t->open("10.1.4.2");
@lines = $t->cmd("i");
print @lines;
The script return with the following error message:
"bad match operator: opening delimiter missing: -> at try3 line 2"
The script always fails at the prompt line. Does the Net::Telnet
object require a username and password?