$query = "SELECT DISTINCT a.url FROM links_current a LEFT JOIN links_archive b ON a.url = b.url WHERE b.url IS NULL ;"; $statement = $dbh->prepare($query) or error ("Cannot Prepare Select links_current Statement: " . $dbh->errstr()); $statement->execute() or error ("Cannot Execute Select Distinct links_current Statement: " . $dbh->errstr()); my $arraycount = $statement->rows; # Fetch Each New Link (Record) Not Previous Archived Inside The Database my $counter = 1; while (my $website = $statement->fetchrow_array()){ $mech->get($website)