in reply to Re: foreach (@array) s/x/y/ efficiency
in thread foreach (@array) s/x/y/ efficiency

Although index runs faster than s///, $phrase is actually two words that may have "stuff" between them (in @material) other than just a space (as they would have in $phrase). So this doesn't match a lot of the phrases. :(