my $count = 0; while (my($key, $value) = each(%ip_discover_count) and $count == 0) { $count++; } if ($count > 0)