s/\band\b/$word/ig; while (/\band\b/ig) { ++$count; }