My guess would be that your @newmails array is empty either because the @emails array was empty or because everything is being ignored by your $ignore regex (which uses character classes in a few places where I'm pretty sure you just meant to use parens for grouping). Have you tried printing out the @newmails array after your foreach loop?
In reply to Re: How not to pass undef variables
by danger
in thread How not to pass undef variables
by dru145
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |