in reply to Conditional matching into qr variable

You used (?!, which is a look-ahead. You needed a look-behind. Unfortunately, variable length look-behind is not implemented (and "moderate" is longer than "mild"). So, you have to reverse your string and use a negative variable length look-ahead:
#!/usr/bin/perl use warnings; use strict; use feature qw(say); my @w = ('active', 'not active', 'mild active', 'moderate active'); for (@w) { my $r = reverse; say "$_: ", $r =~ /evitca(?! dlim| etaredom)/ ? 1 : 0, '.'; }
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ