What does trim() do? Could it be responsible for creating empty entries in your hash?
Some other comments about your code:
my $count = 0; while (my($key, $value) = each(%ip_discover_count) and $count == 0) { $count++; } if ($count > 0)
with this:
if ( keys %ip_discover_count )
update: keys is unnecessary, as demonstrated by dave_the_m. I was thrown by the OP's use of $count, which doesn't count.
In reply to Re: Why Does the Hash Seem Empty?
by FunkyMonk
in thread Why Does the Hash Seem Empty?
by o2bwise
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |