while ($_ =~ m/\Q$constant\E/gc) { $count++; }