use Net::Ping; my $host = "www.server.com"; my $alive_url = "http://www.server.com/somepage"; my $dead_url = "http://www.backupserver.org"; my $p = Net::Ping->new(); my $url = $p->ping($host) ? $alive_url : $dead_url; $p->close(); print <Go to $url.

EOT