&do_something foreach grep { (! conditionA) && conditionB } @tmp;