#!/usr/bin/perl use strict; use warnings; use LWP::Simple; my @IP = qw/ 192.168.1.1 192.168.1.2/; my $url = '/home/index.html'; foreach (@IP) { print "TESTING: $_$url\n"; my $reply = get("http://$_$url"); #test reply here, etc... } #### #!/usr/bin/perl # test_url.pl use strict; use warnings; use LWP::Simple; my $ip=""; my $url = '/home/index.html'; while(defined($ip=)) { my $reply = get("http://$ip$url"); warn "couldn't get $ip$url\n" unless defined $reply; }