in reply to Re: Catching timeout for Net::Telnet
in thread Catching timeout for Net::Telnet
use Net::Telnet ();
eval {
$t = Net::Telnet ->new(Timeout => 10,
Prompt => '/.*# $/');
};
warn $@ if $@;
$t->open("10.0.0.$num") || die "can't telnet to $num\n";
$t->login('$log','$pwd');
$t->cmd("cd /home/dir");
@lines = $t->cmd("ps uax");
...
Thanks.
HeffaK
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Catching timeout for Net::Telnet
by no_slogan (Deacon) on May 09, 2001 at 23:00 UTC | |
by HeffaK (Initiate) on May 10, 2001 at 00:03 UTC |