sub repeated { ($_,$t,$n,$m,@p)=@_; for$i($n..$m){$t=~$1&&push@p,$&while/\b(?=((\w+\b ?){$i}))/g}@p }