Yeah, I thought .* would work, but it will still produce a match. I think it has something to do with the way the matching works...like it will consider 'goodxxx' a match because there is nothing (satisfies .* requirement) followed by something that is not 'bad' i.e. 'xxx' (satisfies ?!bad requirement). I'm new to Perl, so I'm sure someone more experienced can explain it better.

Don't worry, I'm not a student. I just inherited some code at work and I just started learning Perl this week so I can modify it. It'd take too long to explain the situation with this code, so I guess you'll just have to trust me that I ***have*** to use one condition.

But given that it took me so long to figure out what was going on, I think I may do the next guy a favor and do some major surgery to the code so it can look for good words and bad words.