Dear list,

I've got this code:

# now grab sub_domains, if there are any
my @sub_domains = keys( %{ $HKU->{$full_domain} } );

# if there are sub-domains, we don't want the parent in the list
if ($#sub_domains >= 0) {
    pop( @ret_ary );
}

Where @ret_ary contains URL info gathered using functions from TieRegistry. The problem is that whether there is anything in @sub_domains or not, the pop() call gets executed.

The question is, how can I determine if the keys() call returned anything--that is, if @sub_domains contains anything or if it's empty.  I'm trying to list Trusted Sites read from the registry, and what's happening is that either I get both parent and child sites (e.g.: abcd.com AND www.abcd.com) as well as sites without children (e.g.: triffids.com). or, if I try to eliminate the abcd.com, using the code above, I also lose triffids.com.

Thanks,

Deane
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to