#!/usr/bin/perl @ips = ('200.219.199.32','204.71.200.75'); foreach $ip (@ips) { $ping = system("ping -c 1 $ip"); if ($ping < 256) { # next; } elsif ($ping = 256) { # timed out # do something to restart the connection # probably, set internal modem (not my Adsl modem)to pick up the phone line, and hangup, to cause a "sync break"! } }