Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Script stops running.
You really need to ask this on a Perl list or in one of the ontopic usenet Perl forums.
Check www.perl.com.
Jared
"Nguyen, David M" <david.m.nguyen_at_xo.com>
Sent by: root_at_fatcity.com
02/08/02 08:33 AM
Please respond to ORACLE-L
To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> cc: Subject: Script stops running.
Hi all,
I get a perl script to telnet to several machines on network to check
something I want to check. When it trys to connect a machine which is
down,
the script will stop running. How do I tell it to continue to check the
next machine and ignore the one down?. Below is my script.
Thanks,
David
use Net::Telnet;
%city = qw(host1 passwd
host2 passwd host3 passwd host4 passwd );
$telnet = Net::Telnet->new
(
Timeout => 10,
Input_log => 'PSXreplication.log',
Prompt => ('/[%:] $/'),
);
foreach $key (sort keys %city) {
$telnet->prompt("/$key%/i");
$telnet->open("$key");
$telnet->login('ssuser', "$city{$key}");
$telnet->prompt("/$key%/i");
$telnet->cmd('ls -l');
print "=============================================================\n\n";
$telnet->close("$key");
}
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Nguyen, David M INET: david.m.nguyen_at_xo.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: Jared.Still_at_radisys.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Fri Feb 08 2002 - 13:24:27 CST
![]() |
![]() |