I am trying to scp a file to various systems, but the script hangs if the scp command to one of the systems fails. Is there a way in perl to specify that if the scp command doesn't work to skip it and continue with the next system? I have the following:
: : use Net::Ping; @systems = qw(system1 system2 system3); foreach $system (@systems) { $p = Net::Ping->new("icmp"); next unless $p->ping($system); system("/usr/local/bin/scp file $system:/home"); $p->close(); } -------- This works if the system is not reachable. But if the system is reachable but it is hung for some other reason, the script tries to do the scp command which it won't work. So the script does not continue. Any ideas on this would be greatly appreciated. Thanks. __________________________________________________ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]