http://www.perlmonks.org?node_id=24547

JP Sama has asked for the wisdom of the Perl Monks concerning the following question:

I use ADSL connection, and my connection has an "unexplicable" problem!
So I've decided to use a pl in my cron... :) but, I am wandering if the best way to do it is using:
(for example)
#!/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 t +he phone line, and hangup, to cause a "sync break"! } }
If someone could give me a "light", or a sugestion about the best way to do it!

tks to all!

-jpsama