
d1zz13
User
Apr 19, 2006, 2:39 AM
Post #11 of 23
(2793 views)
|
|
Re: [bobbyperl] Web Server test
[In reply to]
|
Can't Post
|
|
As Dave mentioned, you need to test each of the hosts inside the array individually, using a foreach is ideal for this situation, try something like this:
#!/usr/bin/perl use strict; use warnings; use LWP::Simple; @hosts = ("www.domain4.com","www.domain3.com","www.domain2.com","www.domain1.com"); foreach $host(@hosts){ unless (head($host)){ print "There seems to be a problem with $host\n"; } } Also try and use code tags when posting to the forum, it makes it easier to read. Regards Rich Regards Rich If it aint broke then don't try to fix it
|