foreach my $cat (@cats) { if ($cat !~ m/meow=.+?/i) { # do action here } }