foreach (@emails){ next unless $_; next if $_ =~ $ignore; push(@newemails, $_); }