in reply to How not to pass undef variables

There are some cunning modules that may help. I suggest:
use Emails::Find; find_emails($result, \&callback); sub callback { my $email = shift; return if $email->host eq 'uu.net'; return if $email->host =~ /apnic\.(?:com|net)/; return if $email->address eq 'NOC@SPRINT.NET'; # etc print $email->address, "\n"; }
Hope this helps.