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 In reply to Re: Re: Catching timeout for Net::Telnet
by HeffaK
in thread Catching timeout for Net::Telnet
by HeffaK
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |