my @listToExpire = grep { my $a = $_; (grep /$a/, @listA) ? () : ($a); } @listB;