.....
my($query) = "SELECT weburl, webdate FROM table WHERE approval = '1' LIMIT 10";
my($sth) = $dbh->prepare($query);
$sth->execute || die("Could not execute!");
while(@row = $sth->fetchrow_array) {
$whereto = "$row[0]";
&letsgo;
}
exit;
sub letsgo {
$ua->agent("Mozilla/8.0");
$req = new HTTP::Request 'GET' => '$whereto';
$res = $ua->request($req);
if ($res->is_success) {
print "$whereto WORKS\n";
} else {
print "$whereto doesnt work\n";
}
}
####
$req = new HTTP::Request 'GET' => '$whereto';
####
$req = new HTTP::Request 'GET' => 'http://www.google.com';