S
Shotoku Taishi
Hi
I would like to run commands remotely using net::telnet from CPAN.
I am trying to run the following:
#!/usr/bin/perl -w
use strict;
use Net::Telnet;
my $host= "Andromeda";
my $username = "Andro";
my $passwd = "stars";
$t = new Net::Telnet (Timeout => 10,
Prompt => '/c:\\\\users\\\\andro>$/i');
$t->open("$host");
$t->login($username, $passwd);
@lines = $t->cmd("ls");
print @lines;
I get the following error message:
Global symbol "$t" requires explicit package name
Thanks
Mike
I would like to run commands remotely using net::telnet from CPAN.
I am trying to run the following:
#!/usr/bin/perl -w
use strict;
use Net::Telnet;
my $host= "Andromeda";
my $username = "Andro";
my $passwd = "stars";
$t = new Net::Telnet (Timeout => 10,
Prompt => '/c:\\\\users\\\\andro>$/i');
$t->open("$host");
$t->login($username, $passwd);
@lines = $t->cmd("ls");
print @lines;
I get the following error message:
Global symbol "$t" requires explicit package name
Thanks
Mike